login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010056 Characteristic function of Fibonacci numbers: a(n) = 1 if n is a Fibonacci number, otherwise 0. 64

%I #92 Feb 01 2024 05:55:29

%S 1,1,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,

%T 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,

%U 0,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

%N Characteristic function of Fibonacci numbers: a(n) = 1 if n is a Fibonacci number, otherwise 0.

%C Understood as a binary number, Sum_{k>=0} a(k)/2^k, the resulting decimal expansion is 1.910278797207865891... = Fibonacci_binary+0.5 (see A084119) or Fibonacci_binary_constant-0.5 (see A124091), respectively. - _Hieronymus Fischer_, May 14 2007

%C a(n)=1 if and only if there is an integer m such that x=n is a root of p(x)=25*x^4-10*m^2*x^2+m^4-16. Also a(n)=1 iff floor(s)<>floor(c) or ceiling(s)<>ceiling(c) where s=arcsinh(sqrt(5)*n/2)/log(phi), c=arccosh(sqrt(5)*n/2)/log(phi) and phi=(1+sqrt(5))/2. - _Hieronymus Fischer_, May 17 2007

%C a(A000045(n)) = 1; a(A001690(n)) = 0. - _Reinhard Zumkeller_, Oct 10 2013

%C Image, under the map sending a,b,c -> 1, d,e,f -> 0, of the fixed point, starting with a, of the morphism sending a -> ab, b -> c, c -> cd, d -> d, e -> ef, f -> e. - _Jeffrey Shallit_, May 14 2016

%H Reinhard Zumkeller, <a href="/A010056/b010056.txt">Table of n, a(n) for n = 0..10000</a>

%H Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit, and Luca Q. Zamboni, <a href="https://arxiv.org/abs/1711.10807">A Taxonomy of Morphic Sequences</a>, arXiv preprint arXiv:1711.10807 [cs.FL], Nov 29 2017.

%H D. Bailey et al., <a href="https://doi.org/10.5802/jtnb.457">On the binary expansions of algebraic numbers</a>, Journal de Théorie des Nombres de Bordeaux (2004), Volume: 16, Issue: 3, page 487-518.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci number</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F G.f.: (Sum_{k>=0} x^A000045(k)) - x. - _Hieronymus Fischer_, May 17 2007

%p a:= n-> (t-> `if`(issqr(t+4) or issqr(t-4), 1, 0))(5*n^2):

%p seq(a(n), n=0..144); # _Alois P. Heinz_, Dec 06 2020

%t Join[{1},With[{fibs=Fibonacci[Range[15]]},If[MemberQ[fibs,#],1,0]& /@Range[100]]] (* _Harvey P. Dale_, May 02 2011 *)

%o (PARI) a(n)=my(k=n^2);k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8)) \\ _Charles R Greathouse IV_, Jul 30 2012

%o (Haskell)

%o import Data.List (genericIndex)

%o a010056 = genericIndex a010056_list

%o a010056_list = 1 : 1 : ch [2..] (drop 3 a000045_list) where

%o ch (x:xs) fs'@(f:fs) = if x == f then 1 : ch xs fs else 0 : ch xs fs'

%o -- _Reinhard Zumkeller_, Oct 10 2013

%o (Python)

%o from sympy.ntheory.primetest import is_square

%o def A010056(n): return int(is_square(m:=5*n**2-4) or is_square(m+8)) # _Chai Wah Wu_, Mar 30 2023

%Y Cf. A000045, A001690, A072649, A104162, A108852, A124091, A130233, A130234.

%Y Decimal expansion of Fibonacci binary is in A084119.

%Y Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

%Y Cf. A079586 (Dirich. g.f. at s=1).

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 11:44 EDT 2024. Contains 372293 sequences. (Running on oeis4.)