cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 134 results. Next

A094202 Integers k whose Zeckendorf representation A014417(k) is palindromic.

Original entry on oeis.org

0, 1, 4, 6, 9, 12, 14, 22, 27, 33, 35, 51, 56, 64, 74, 80, 88, 90, 116, 127, 145, 158, 174, 184, 197, 203, 216, 232, 234, 276, 294, 326, 368, 378, 399, 425, 441, 462, 472, 493, 519, 525, 546, 572, 588, 609, 611, 679, 708, 760, 828, 847, 915, 944, 988, 1022, 1064, 1090
Offset: 1

Views

Author

Ron Knott, May 25 2004

Keywords

Examples

			Fibonacci base columns are ...,8,5,3,2,1 with column entries 0 or 1 and no two consecutive ones (the Zeckendorf representation) so that each n has a unique representation.
12 is in the sequence because 12 = 8 + 3 + 1 = 10101 base Fib; 14 = 13 + 1 = 100001 base Fib.
		

References

  • C. G. Lekkerkerker, Voorstelling van natuurlijke getallen door een som van getallen van Fibonacci, Simon Stevin vol. 29, 1952, pages 190-195.
  • E. Zeckendorf, Représentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres de Lucas, Bulletin de la Société Royale des Sciences de Liège vol. 41 (1972) pages 179-182.

Crossrefs

Gives the positions of zeros in A095734. Subsets: A095730, A048757. A006995 gives the integers whose binary expansion is palindromic.

Programs

  • Mathematica
    zeck[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[ fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr]]; a = {}; Do[z = zeck[n]; If[ FromDigits[ Reverse[ IntegerDigits[z]]] == z, AppendTo[a, n]], {n, 1123}]; a (* Robert G. Wilson v, May 29 2004 *)
    mirror[dig_, s_] := Join[dig, s, Reverse[dig]]; select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &]; fib[dig_] := Plus @@ (dig * Fibonacci[Range[2, Length[dig] + 1]]); pals = Rest[IntegerDigits /@ FromDigits /@ Select[Tuples[{0, 1}, 7], SequenceCount[#, {1, 1}] == 0 &]]; Union@Join[{0, 1}, fib /@ Join[mirror[#, {}] & /@ (select[pals, 1]), mirror[#, {1}] & /@ (select[pals, 1]), mirror[#, {0}] & /@ pals]] (* Amiram Eldar, Jan 11 2020 *)
  • Python
    from sympy import fibonacci
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n):
        x=str(a(n))
        return x==x[::-1]
    print([n for n in range(1101) if ok(n)]) # Indranil Ghosh, Jun 07 2017

Extensions

More terms from Robert G. Wilson v, May 28 2004
Offset changed to 1 by Alois P. Heinz, Aug 02 2017

A134860 Wythoff AAB numbers; also, Fib101 numbers: those n for which the Zeckendorf expansion A014417(n) ends with 1,0,1.

Original entry on oeis.org

4, 12, 17, 25, 33, 38, 46, 51, 59, 67, 72, 80, 88, 93, 101, 106, 114, 122, 127, 135, 140, 148, 156, 161, 169, 177, 182, 190, 195, 203, 211, 216, 224, 232, 237, 245, 250, 258, 266, 271, 279, 284, 292, 300, 305, 313, 321, 326, 334, 339, 347, 355, 360, 368, 373
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004 and Clark Kimberling, Nov 14 2007

Keywords

Comments

The lower and upper Wythoff sequences, A and B, satisfy the complementary equations AAB=AA+AB and AAB=A+2B-1.
The asymptotic density of this sequence is 1/phi^4 = 2/(7+3*sqrt(5)), where phi is the golden ratio (A001622). - Amiram Eldar, Mar 21 2022

Crossrefs

Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864. The eight triples AAA, AAB, ..., BBB are A134859, A134860, A035337, A134862, A134861, A134863, A035338, A134864, resp.
Set-wise difference A003622 \ A095098. Cf. A095089 (fib101 primes).

Programs

  • Mathematica
    With[{r = Map[Fibonacci, Range[2, 14]]}, Position[#, {1, 0, 1}][[All, 1]] &@ Table[If[Length@ # < 3, {}, Take[#, -3]] &@ IntegerDigits@ Total@ Map[FromDigits@ PadRight[{1}, Flatten@ #] &@ Reverse@ Position[r, #] &,Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], n + 1, # > 1 &]], {n, 373}]] (* Michael De Vlieger, Jun 09 2017 *)
  • Python
    from sympy import fibonacci
    def a(n):
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n): return str(a(n))[-3:]=="101"
    print([n for n in range(4, 501) if ok(n)]) # Indranil Ghosh, Jun 08 2017
    
  • Python
    from math import isqrt
    def A134860(n): return 3*(n+isqrt(5*n**2)>>1)+(n<<1)-1 # Chai Wah Wu, Aug 10 2022

Formula

a(n) = A(A(B(n))), n>=1, with A=A000201, the lower Wythoff sequence and B=A001950, the upper Wythoff sequence.

Extensions

This is the result of merging two sequences which were really the same. - N. J. A. Sloane, Jun 10 2017

A095096 Fibevil numbers: those numbers k for which the parity of 1-fibits in Zeckendorf expansion A014417(k) is even, i.e., for which A095076(k) = 0.

Original entry on oeis.org

0, 4, 6, 7, 9, 10, 11, 14, 15, 16, 18, 22, 23, 24, 26, 29, 33, 35, 36, 37, 39, 42, 46, 47, 51, 53, 54, 56, 57, 58, 60, 63, 67, 68, 72, 74, 75, 76, 80, 82, 83, 85, 86, 87, 90, 91, 92, 94, 97, 101, 102, 106, 108, 109, 110, 114, 116, 117, 119, 120, 121, 123, 127, 129
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Characteristic function: A095111.
Complement of A020899.
Cf. A001969 (evil numbers), A014417, A095076, A095084 (fibevil primes).

Programs

  • Maple
    A095096 := proc(n)
        option remember;
        local a;
        if n =1 then
            0;
        else
            for a from procname(n-1)+1 do
                if A095076(a) = 0 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A095096(n),n=1..60) ; # R. J. Mathar, Sep 22 2020
  • Mathematica
    Flatten @ Position[Mod[DigitCount[Select[Range[0, 1000], BitAnd[#, 2 #] == 0 &], 2, 1], 2], 0] - 1  (* Amiram Eldar, Feb 05 2023 *)

Extensions

Changed offset to 1. - N. J. A. Sloane, Sep 12 2020

A095076 Parity of 1-fibits in Zeckendorf expansion A014417(n).

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0
Offset: 0

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

Let u = A000201 = (lower Wythoff sequence) and v = A001950 = (upper Wythoff sequence). Conjecture: This sequence is the sequence p given by p(1) = 0 and p(u(k)) = p(k); p(v(k)) = 1-p(k). - Clark Kimberling, Apr 15 2011
[base 2] 0.111010010001100... = 0.9105334708635617... - Joerg Arndt, May 13 2011
From Michel Dekking, Nov 28 2019: (Start)
This sequence is a morphic sequence.
Let the morphism sigma be given by
sigma(1) = 12, sigma(2) = 4, sigma(3) = 1, sigma(4) = 43,
and let the letter-to-letter map lambda be given by
lambda(1) = 0, lambda(2) = 1, lambda(3) = 0, lambda(4) = 1.
Then a(n) = lambda(x(n)), where x(0)x(1)... = 1244343... is the fixed point of sigma starting with 1.
See footnote number 4 in the paper by Emmanuel Ferrand. (End)
From Michel Dekking, Nov 29 2019: (Start)
Proof of Kimberling's conjecture, by virtue of the four symbol morphism sigma in the previous comment.
We first show that the fixed point x = 1244343143112... of sigma has the remarkable property that the letters 1 and 4 exclusively occur at positions u(k), k=1,2,..., and the letters 2 and 3 exclusively occur at positions v(k) k=1,2,....
To see this, let alpha be the Fibonacci morphism on the alphabet {a,b}:
alpha(a) = ab, alpha(b) = a.
It is well known that the lower Wythoff sequence u gives the positions of a in the fixed point abaababaab... of alpha, and that the upper Wythoff sequence v gives the positions of b in this infinite Fibonacci word.
Let pi be the projection from {1,2,3,4} to {a,b} given by
pi(1) = pi(4) = a, pi(2) = pi(3) = b.
One easily checks that (composition of morphisms)
pi sigma = alpha pi.
This implies the remarkable property stated above.
What remains to be proved is that lambda(x(u(k)) = a(k) and lambda(x(v(k)) = a(k), where lambda is the letter-to-letter map in the previous comment. We tackle this problem by an extensive analysis of the return words of the letter 1 in the sequence x= 1244343143112...
These are the words occurring in x which start with 1 and have no other occurrences of 1 in them.
One easily finds that they are given by
A:=1, B:=12, C:=124, D:=143, E:=1243, F:=12443, G:=1244343.
These words partition x. Moreover, sigma induces a morphism rho on the alphabet {A,B,C,D,E,F,G} given by
rho(A) = B, rho(B) =C, rho(C) = F, rho(D) = EA,
rho(E) = FA, rho(F) = GA, rho(G) = GDA.
CLAIM 1: Let mu be the letter-to-letter map given by
mu(A)=mu(B) = 1, mu(C)=mu(D)=mu(E) = 2, mu(F) = 3, mu(G) = 4,
then mu(R) = (s(n+1)-s(n)), where R = GDAEABFAB... is the unique fixed point of rho and s = 1,5,7,8,10,... is the sequence of positions of 1 in (x(u(k)).
Proof of CLAIM 1: The 1's in x occur exclusively at positions u(k), so if we want the differences s(n+1)-s(n), we can strip the 2's and 3's from the return words of 1, and record how long it takes to the next 1. This is the length of the stripped words A~=1, B~=1, C~=14, ... which is given by mu.
CLAIM 2: Let delta be the 'decoration' morphism given by
delta(A) = 1, delta(B) = 2, delta(C) = 3, delta(D) = 21,
delta(E) = 31, delta(F) = 41, delta(G) = 421,
then delta(R) = (t(n+1-t(n)), where rho(R) = R, and t is the sequence of positions of 1 or 3 in the sequence x = 1244343143112....
Proof of CLAIM 2: We have to record the differences in the occurrences of 1 and 3 in the return words of 1. These are given by delta. For example: F = 12443, where 1 and 3 occur at position 1 and 5; and the next 1 will occur at the beginning of any of the seven words A,...,G.
If we combine CLAIM 1 and CLAIM 2 with lambda(1) = lambda(3) = 0, we obtain the first half of Kimberling's conjecture, simply because delta = mu rho, and rho(R) = R.
The second half of the conjecture is obtained in a similar way. (End)
From Michel Dekking, Mar 10 2020: (Start)
The fact that this sequence is a morphic sequence can be easily deduced from the morphism tau given in A007895:
tau((j,0)) = (j,0) (j+1,1),
tau((j,1)) = (j,0).
The sum of digits of a number n in Zeckendorf expansion is given by projecting the n-th letter in the fixed point of tau starting with (0,0) on its first coordinate: (j,i)->j for i=0,1.
If we consider all the j's modulo 2, we obtain a morphism sigma' on 4 letters:
sigma'((0,0)) = (0,0) (1,1),
sigma'((0,1)) = (0,0),
sigma'((1,0)) = (1,0)(0,1),
sigma'((1,1)) = (1,0).
The change of alphabet (0,0)->1, (0,1)->3, (1,0)->4, (1,1)->2, turns sigma' into sigma given in my Nov 28, 2019 comment. The projection map turns into the map 1->0, 2->1, 3->0, 4->1, as in my Nov 28 2019 comment.
(End)
Another proof that this sequence is a morphic sequence has been given in the monograph by Allouche and Shallit. They demonstrate on page 239 that (a(n)) is a letter to letter projection of a fixed point of a morphism on an alphabet of six letters. However, it can be seen easily that two pairs of letters can be merged, yielding a morphism on an alphabet of four letters, which after a change of alphabet equals the morphism from my previous comments. - Michel Dekking, Jun 25 2020

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, Examples 7.8.2 and 7.8.4.

Crossrefs

Characteristic function of A020899.
Run counts are given by A095276.
Cf. A003714, A007895, A010060, A095111, A189034, A189035 (positions of 0 and 1 if the conjecture is valid).

Programs

  • Maple
    A095076 := proc(n)
        modp(A007895(n),2) ;
    end proc:
    seq(A095076(n),n=0..40) ; # R. J. Mathar, Sep 22 2020
  • Mathematica
    r=(1+5^(1/2))/2; u[n_] := Floor[n*r];  (* A000201 *)
    a[1] = 0; h = 128;
    c = (u[#1] &) /@ Range[2h];
    d = (Complement[Range[Max[#1]], #1] &)[c]; (* A001950 *)
    Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}];
    Table[a[c[[n]]] = a[n], {n, 1, h}] (* A095076 conjectured *)
    Flatten[Position[%, 0]]  (* A189034 *)
    Flatten[Position[%%, 1]] (* A189035 *)
    Mod[DigitCount[Select[Range[0, 540], BitAnd[#, 2 #] == 0 &], 2, 1], 2] (* Amiram Eldar, Feb 05 2023 *)
  • Python
    def ok(n): return True if n==0 else n*(2*n & n == 0)
    print([bin(n)[2:].count("1")%2 for n in range(1001) if ok(n)]) # Indranil Ghosh, Jun 08 2017

Formula

a(n) = A010060(A003714(n)).
a(n) = 1 - A095111(n).
a(n) = A007895(n) mod 2. - Michel Dekking, Mar 10 2020

A318465 The number of Zeckendorf-infinitary divisors of n = Product_{i} p(i)^r(i): divisors d = Product_{i} p(i)^s(i), such that the Zeckendorf expansion (A014417) of each s(i) contains only terms that are in the Zeckendorf expansion of r(i).

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 4, 4, 4, 2, 4, 2, 4, 4, 4, 2, 4, 2, 4, 2, 4, 2, 8, 2, 2, 4, 4, 4, 4, 2, 4, 4, 4, 2, 8, 2, 4, 4, 4, 2, 8, 2, 4, 4, 4, 2, 4, 4, 4, 4, 4, 2, 8, 2, 4, 4, 4, 4, 8, 2, 4, 4, 8, 2, 4, 2, 4, 4, 4, 4, 8, 2, 8, 4, 4, 2, 8, 4, 4, 4, 4, 2, 8, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 2, 8, 2, 4, 8
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2018

Keywords

Comments

Zeckendorf-infinitary divisors are analogous to infinitary divisors (A077609) with Zeckendorf expansion instead of binary expansion. - Amiram Eldar, Jan 09 2020

Examples

			a(16) = 4 since 16 = 2^4 and the Zeckendorf expansion of 4 is 101, i.e., its Zeckendorf representation is a set with 2 terms: {1, 3}. There are 4 possible exponents of 2: 0, 1, 3 and 4, corresponding to the subsets {}, {1}, {3} and {1, 3}. Thus 16 has 4 Zeckendorf-infinitary divisors: 2^0 = 1, 2^1 = 2, 2^3 = 8, and 2^4 = 16.
		

Crossrefs

Programs

  • Mathematica
    fb[n_] := Block[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; Fibonacci[1 + Position[Reverse@fr, ?(# == 1 &)]]]; f[p, e_] := 2^Length@fb[e]; a[1] = 1; a[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n])); Array[a, 100] (* Amiram Eldar, Jan 09 2020 after Robert G. Wilson v at A014417 *)
  • PARI
    A072649(n) = { my(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2); }; \\ From A072649
    A007895(n) = { my(s=0); while(n>0, s++; n -= fibonacci(1+A072649(n))); (s); }
    A318465(n) = factorback(apply(e -> 2^A007895(e),factor(n)[,2]));

Formula

Multiplicative with a(p^e) = 2^A007895(e), where A007895(n) gives the number of terms in the Zeckendorf representation of n.
a(n) = 2^A318464(n).

Extensions

Name edited and interpretation in terms of divisors added by Amiram Eldar, Jan 09 2020

A095084 Fibevil primes, i.e., primes p whose Zeckendorf-expansion A014417(p) contains an even number of 1-fibits.

Original entry on oeis.org

7, 11, 23, 29, 37, 47, 53, 67, 83, 97, 101, 109, 127, 137, 139, 149, 157, 163, 193, 199, 223, 241, 263, 271, 277, 281, 283, 311, 317, 331, 337, 359, 373, 379, 389, 397, 409, 421, 439, 443, 461, 499, 503, 521, 547, 557, 563, 577, 593, 601, 607
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A095096.

Programs

  • Mathematica
    Select[Flatten[Position[Mod[DigitCount[Select[Range[0, 6000], BitAnd[#, 2 #] == 0 &], 2, 1], 2], 0]] - 1, PrimeQ] (* Amiram Eldar, Feb 07 2023 *)

A095730 Primes p whose Zeckendorf-expansion A014417(p) is palindromic.

Original entry on oeis.org

127, 197, 1949, 2137, 3323, 3821, 7253, 8117, 10243, 13183, 14947, 15131, 30941, 31721, 39607, 43691, 49207, 54773, 62213, 66413, 70141, 70429, 70607, 71089, 123457, 123923, 129023, 134039, 137699, 145391, 149381, 157219, 162523, 167759, 172357, 176237, 181253
Offset: 1

Views

Author

Antti Karttunen, Jun 12 2004

Keywords

Crossrefs

Intersection of A000040 and A094202. Cf. A095731 for number of occurrences. A095733 shows the corresponding Fibonacci-representations.

A095083 Fibodious primes, i.e., primes p whose Zeckendorf-expansion A014417(p) contains an odd number of 1-fibits.

Original entry on oeis.org

2, 3, 5, 13, 17, 19, 31, 41, 43, 59, 61, 71, 73, 79, 89, 103, 107, 113, 131, 151, 167, 173, 179, 181, 191, 197, 211, 227, 229, 233, 239, 251, 257, 269, 293, 307, 313, 347, 349, 353, 367, 383, 401, 419, 431, 433, 449, 457, 463, 467, 479, 487, 491
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A020899.

Programs

  • Mathematica
    Select[Flatten[Position[Mod[DigitCount[Select[Range[0, 5000], BitAnd[#, 2 #] == 0 &], 2, 1], 2], 1]] - 1, PrimeQ] (* Amiram Eldar, Feb 07 2023 *)
  • Python
    from sympy import fibonacci, primerange
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n): return str(a(n)).count("1")%2
    print([n for n in primerange(1, 1001) if ok(n)]) # Indranil Ghosh, Jun 08 2017

A095111 One minus the parity of 1-fibits in Zeckendorf expansion A014417(n).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1
Offset: 0

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Characteristic function of A095096.
Run counts are given by A095276.

Programs

  • Mathematica
    1 - Mod[DigitCount[Select[Range[0, 540], BitAnd[#, 2 #] == 0 &], 2, 1], 2] (* Amiram Eldar, Feb 05 2023 *)
  • Python
    def ok(n): return 1 if n==0 else n*(2*n & n == 0)
    print([1 - bin(n)[2:].count("1")%2 for n in range(1001) if ok(n)]) # Indranil Ghosh, Jun 08 2017

Formula

a(n) = A010059(A003714(n)).
a(n) = 1 - A095076(n).
a(n) = a'(n+1) where a'(1) = 1 and if n >= 2 with F(k) < n <= F(k+1), a'(n)=1-a'(n-F(k)), where F(k) = A000045(k). E.g., F(5) = 5 < 6 <= F(6) = 8, thus a'(6) = 1 - a'(1) = 0 and a(5) = 0. - Benoit Cloitre, May 10 2005

A210619 Triangle of numbers with n 1's and n 0's in their representation in base of Fibonacci numbers (A014417).

Original entry on oeis.org

2, 6, 7, 17, 19, 20, 46, 51, 53, 54, 122, 135, 140, 142, 143, 321, 355, 368, 373, 375, 376, 842, 931, 965, 978, 983, 985, 986, 2206, 2439, 2528, 2562, 2575, 2580, 2582, 2583, 5777, 6387, 6620, 6709, 6743, 6756, 6761, 6763, 6764, 15126, 16723, 17333, 17566, 17655, 17689, 17702, 17707, 17709, 17710
Offset: 1

Views

Author

Alex Ratushnyak, May 07 2012

Keywords

Comments

There are n such 2n-bit numbers. For example, 17, 19, and 20 all require six bits: 100101, 101001, 101010. The least number in each group is Fib(2n+1) + Fib(2n-1) - 1, which is A005592(n). The greatest number in each group is Fib(2n+2) - 1, which is A035508(n). - T. D. Noe, May 08 2012

Examples

			Representation of 20 is 101010, three 1's and three 0's, so 20 is in the sequence.
Representation of 22 is 1000001, two 1's and five 0's, so 22 is not in the sequence.
		

Crossrefs

Cf. A014417, A003714, A000045 (Fibonacci numbers).
Cf. A005592 (column k=1), A035508 (main diagonal), A249450 (second diagonal), A346434 (in Fibonacci base).

Programs

  • Mathematica
    nn = 10; f = Join[{0}, Accumulate[Fibonacci[Range[2, 2*nn, 2] - 1]]]; t = Table[hi = f[[n+1]] - 1; Reverse[Table[hi - f[[i]], {i, n - 1}]], {n, 2, nn}]; t = Flatten[t] (* T. D. Noe, May 08 2012 *)

Formula

Numbers with equal counts of 1's and 0's in their Zeckendorf representation.
From Kevin Ryde, Jul 24 2021: (Start)
T(n,k) = Fibonacci(2*n+2) - Fibonacci(2*(n-k)) - 1.
G.f.: x*y*(2 - 2*x + x^2 - (1 + x + x^2)*x*y + x^3*y^2) / ( (1-x) * (1 - 3*x + x^2) * (1 - x*y) * (1 - 3*x*y + (x*y)^2) ).
(End)
Showing 1-10 of 134 results. Next