[go: up one dir, main page]

login
a(n) = if (exactly 5 Fibonacci numbers exist with exactly n digits) then 1, otherwise 0.
4

%I #14 Dec 17 2018 17:36:28

%S 0,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,

%T 1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,

%U 0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1

%N a(n) = if (exactly 5 Fibonacci numbers exist with exactly n digits) then 1, otherwise 0.

%C The sequence is almost periodic, see also A105566;

%C a(n) = 1 - A105563(n) for n > 1.

%H Robert Israel, <a href="/A105565/b105565.txt">Table of n, a(n) for n = 1..10000</a>

%H Martin Burtscher, Igor Szczyrba, Rafał Szczyrba, <a href="https://www.emis.de/journals/JIS/VOL18/Szczyrba/sz3.html">Analytic Representations of the n-anacci Constants and Generalizations Thereof</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.

%H Jürgen Spilker, <a href="https://www.researchgate.net/publication/251340897_Die_Ziffern_der_Fibonacci-Zahlen">Die Ziffern der Fibonacci-Zahlen</a>, Elemente der Mathematik 58 (Birkhäuser 2003).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FibonacciNumber.html">Fibonacci Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AlmostPeriodicFunction.html">Almost Periodic Function</a>

%p n:= 1: count:= 2: a:= 0: b:= 1:

%p for m from 2 while n < 101 do

%p c:= b; b:= a+b; a:= c;

%p s:= ilog10(b)+1;

%p if s = n then count:= count+1

%p else

%p if count = 5 then A[n]:= 1 else A[n]:= 0 fi;

%p count:= 1; n:= s

%p fi

%p od:

%p seq(A[i],i=1..100); # _Robert Israel_, Dec 17 2018

%Y Cf. A050815, A060384, A000045.

%K nonn,base

%O 1,1

%A _Reinhard Zumkeller_, Apr 14 2005