login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A104162
Indicator sequence for the Fibonacci numbers.
18
1, 2, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
0,2
COMMENTS
Without multiplicities, this is A010056.
The number of nonnegative integer solutions of x^4 - 10*n^2*x^2 + 25*n^4 - 16 = 0. - Hieronymus Fischer, May 17 2007
FORMULA
G.f.: Sum_{k>=0} x^Fibonacci(k).
From Hieronymus Fischer, May 17 2007: (Start)
a(n) = 1+floor(arcsinh(sqrt(5)*n/2)/log(phi))-ceiling(arccosh(sqrt(5)*n/2)/log(phi)), for n>0, where phi=(1+sqrt(5))/2.
a(n) = A108852(n) - A108852(n-1) for n>0.
a(n) = A130233(n) - A130233(n-1) for n>0.
a(n) = 1 + A130233(n) - A130234(n) for n>0.
a(n) = A130234(n+1) - A130234(n) for n>=0. (End)
EXAMPLE
a(1)=2 since F(1)=F(2)=1.
PROG
(PARI) a(n)=if(n==1, return(2)); my(k=n^2); k+=((k + 1) << 2); issquare(k) || issquare(k-8) \\ Charles R Greathouse IV, Feb 03 2014; typo corrected by Georg Fischer, Jun 22 2022
CROSSREFS
Cf. A000045.
Partial sums are in A108852.
See also A130233 and A130234.
Sequence in context: A160381 A089311 A086784 * A145679 A007273 A016319
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2005
STATUS
approved