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.

Previous Showing 11-20 of 25 results. Next

A222295 Conjectured number of Fibonacci numbers with exactly n bits set in their binary representation.

Original entry on oeis.org

1, 4, 4, 2, 3, 3, 4, 1, 4, 2, 1, 5, 5, 2, 2, 2, 5, 4, 3, 2, 2, 2, 3, 5, 3, 3, 2, 4, 2, 1, 4, 3, 2, 3, 3, 1, 6, 3, 2, 3, 3, 4, 4, 5, 0, 0, 3, 3, 2, 2, 5, 4, 3, 1, 5, 2, 2, 2, 5, 7, 3, 0, 0, 1, 2, 7, 3, 3, 2, 4, 3, 1, 2, 4, 4, 2, 0, 3, 1, 3, 7, 3, 4, 1, 3, 4, 3
Offset: 0

Views

Author

T. D. Noe, Feb 22 2013

Keywords

Examples

			We set a(1) = 4 because Fib(1) = 1, Fib(2) = 1, Fib(3) = 2, and Fib(6) = 8.
		

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A221158 (two bits set), A222296.
Cf. A011373 (number of bits set in each Fibonacci number).

Programs

  • Mathematica
    f = Fibonacci[Range[0,500]]; Table[Length[Select[f, Total[IntegerDigits[#, 2]] == n &]], {n, 0, 87}]

A264663 Catalan numbers written in base 2.

Original entry on oeis.org

1, 1, 10, 101, 1110, 101010, 10000100, 110101101, 10110010110, 1001011111110, 100000110011100, 1110010110100010, 110010110010001100, 10110101010111110100, 1010001100111100001000, 100100111110111001111101, 10000110111000001111100110, 111101110100011100011110110, 11100011110000011000000101100
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 20 2015

Keywords

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(Catalan(n), 2)): n in [0..20]]; // Vincenzo Librandi, Nov 21 2015
  • Mathematica
    Table[FromDigits[IntegerDigits[CatalanNumber[n], 2]], {n, 0, 18}]
  • PARI
    vector(30, n, n--; subst(Pol(binary(binomial(2*n,n)/(n+1))), 'x, 10)) \\ Altug Alkan, Nov 20 2015
    

Formula

a(n) = A007088(A000108(n)).

A036286 Periodic vertical binary vectors of Fibonacci numbers, topmost bits being most significant.

Original entry on oeis.org

3, 6, 90, 202474, 802914372650, 124876754670311211270396330, 2261740218128437766312179308277308483058208661638110890, 7527129205899945471753233641719262207829849606092782843679109711117799287001392666047916596823438974998183293610
Offset: 0

Views

Author

Antti Karttunen, Nov 01 1998

Keywords

Examples

			When Fibonacci numbers are written in binary (see A004685), under each other as:
0000000 (0)
0000001 (1)
0000001 (1)
0000010 (2)
0000011 (3)
0000101 (5)
0001000 (8)
0001101 (13)
0010101 (21)
0100010 (34)
0110111 (55)
1011001 (89)
it can be seen that the bits in the n-th column from right repeat after the period of A007283(n): 3, 6, 12, 24, ... (see also A001175). This sequence is formed from those bits: 011, binary for 3, thus a(0) = 3. 000110, binary for 6, thus a(1) = 6, 000001011010, binary for 90, thus a(2) = 90. Cf. A036284.
		

Crossrefs

See comments at A036284. a(n)/A036287(n) can be interpreted as fractions.

Formula

a(n) = Sum_{k=0..A007283(n)-1} ([A000045((A007283(n)-1)-k)/(2^n)] mod 2) * 2^k, where [] stands for floor function.

Extensions

Entry revised Dec 29 2007

A214852 Indices of Fibonacci numbers with the same number of 1's and 0's in their binary representation.

Original entry on oeis.org

3, 36, 42, 59, 116, 156, 168, 211, 237, 246, 280, 335, 355, 399, 404, 416, 433, 442, 569, 580, 652, 698, 761, 770, 865, 897, 940, 989, 1041, 1049, 1101, 1144, 1214, 1286, 1335, 1352, 1369, 1395, 1698, 1726, 1810, 1928, 1940, 1951, 2055, 2159, 2326, 2332
Offset: 1

Views

Author

Alex Ratushnyak, Mar 08 2013

Keywords

Comments

Conjecture: the sequence is infinite.
The sequence of Fibonacci numbers with the same number of 1's and 0's in their binary representation begins: 2, 14930352, 267914296, ... = A259407.

Examples

			Fibonacci(36) = 14930352 = 111000111101000110110000_2, twelve 1's and twelve 0's, therefore 36 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Module[{f = IntegerDigits[Fibonacci[n], 2]}, Count[f, 0] == Count[f, 1]]; Select[Range[3000], fQ] (* T. D. Noe, Mar 08 2013 *)
    Position[Fibonacci[Range[2500]],?(DigitCount[#,2,1]==DigitCount[#,2,0]&)]//Flatten (* _Harvey P. Dale, Aug 17 2025 *)
  • Python
    def count10(x):
        c0, c1, m = 0, 0, 1
        while m<=x:
          if x&m:
            c1+=1
          else:
            c0+=1
          m+=m
        return c0-c1
    prpr, prev = 0,1
    TOP = 3000
    for i in range(1,TOP):
        if count10(prev)==0:
            print(i, end=", ")
        prpr, prev = prev, prpr+prev
    
  • Python
    from sympy import fibonacci
    print([n for n in range(3000) if (f := bin(fibonacci(n))[2:]).count('0') == f.count('1')]) # David Radcliffe, May 31 2025

A221158 Fibonacci numbers with two 1's in the binary representation.

Original entry on oeis.org

3, 5, 34, 144
Offset: 1

Views

Author

Alex Ratushnyak, Feb 20 2013

Keywords

Comments

Fibonacci numbers of the form 2^a + 2^b, a>b.
Elkies (2014) proved that there are no other terms.
This sequence is one row of A222296. - T. D. Noe, Mar 08 2013

Examples

			144 = 128 + 16 = 2^7 + 2^4, thus it is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Fibonacci[Range[1000]], DigitCount[#, 2, 1] == 2 &] (* Alonso del Arte, Feb 21 2013 *)
  • Python
    from sympy import fibonacci
    print([f for n in range(100) if (f := int(fibonacci(n))).bit_count() == 2]) # David Radcliffe, Jul 03 2025

Extensions

full, fini keywords added by Max Alekseyev, May 13 2014

A196024 Odious Fibonacci numbers.

Original entry on oeis.org

1, 2, 8, 13, 21, 55, 233, 1597, 4181, 28657, 121393, 196418, 317811, 1346269, 2178309, 3524578, 9227465, 165580141, 1134903170, 1836311903, 2971215073, 20365011074, 32951280099, 53316291173, 225851433717, 2504730781961, 6557470319842, 17167680177565, 27777890035288
Offset: 1

Views

Author

Kausthub Gudipati, Sep 27 2011

Keywords

Comments

Intersection of A000069 (odious numbers) and A000045 (Fibonacci numbers).
The k-th Fibonacci number is odious for k = 1, 2, 3, 6, 7, 10, 13, 17, 19, 23, 26, 27, 28, 30, 31, 32, 33, 35, 41, 45, ...
The k-th odious number is a Fibonacci number for k = 1, 2, 5, 7, 11, 28, 117, 799, 2091, ...

Examples

			8 is a Fibonacci number that equals 1000 in binary, which contains one (odd number) 1.
		

Crossrefs

Programs

  • Maple
    isA000069 := proc(n)
            type(wt(n),'odd') ;
    end proc:
    for n from 1 to 300 do
            F := combinat[fibonacci](n) ;
            if isA000069(F) then printf("%d,",F) ; end if;
    end do: # R. J. Mathar, Oct 15 2011
  • Mathematica
    Rest[Select[Fibonacci[Range[100]],OddQ[DigitCount[#,2,1]]&]] (* Harvey P. Dale, Oct 16 2011 *)

A214326 Square array read by antidiagonals in which T(n,b) gives the n-th Fibonacci number written in base b with n,b >= 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 11, 1, 1, 10, 111, 1, 1, 2, 11, 11111, 1, 1, 2, 10, 101, 11111111, 1, 1, 2, 3, 12, 1000, 1111111111111, 1, 1, 2, 3, 11, 22, 1101, 111111111111111111111, 1, 1, 2, 3, 10, 20, 111, 10101, 1111111111111111111111111111111111, 1, 1, 2, 3, 5, 13, 31, 210, 100010
Offset: 1

Views

Author

Alois P. Heinz, Jul 24 2012

Keywords

Comments

For b > 10, some terms cannot be properly notated using only decimal characters.

Examples

			Square array A(n,b) begins:
              1,    1,   1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
              1,    1,   1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
             11,   10,   2,  2,  2,  2,  2,  2,  2,  2,  2,  2, ...
            111,   11,  10,  3,  3,  3,  3,  3,  3,  3,  3,  3, ...
          11111,  101,  12, 11, 10,  5,  5,  5,  5,  5,  5,  5, ...
       11111111, 1000,  22, 20, 13, 12, 11, 10,  8,  8,  8,  8, ...
  1111111111111, 1101, 111, 31, 23, 21, 16, 15, 14, 13, 12, 11, ...
		

Crossrefs

Programs

  • Maple
    A:= proc(n, b) local f, l; f:= combinat[fibonacci](n);
          if b=1 then parse(cat(1$f))
        else l:= NULL;
             while f>0 do l:= irem(f, b, 'f'), l od;
             parse(cat(l))
          fi
        end:
    seq(seq(A(n, 1+d-n), n=1..d), d=1..10);

A214853 Fibonacci numbers with only one 0 in the binary representation.

Original entry on oeis.org

0, 2, 5, 13, 55
Offset: 1

Views

Author

Alex Ratushnyak, Mar 08 2013

Keywords

Comments

Conjecture: the sequence is finite.
No more terms below 2*10^301. - Matthew House, Sep 06 2015
No more terms below 10^162809483. (This number could easily be raised. Of the Fibonacci numbers less than 2^32 -- i.e., F(0) through F(47) -- F(10)=55 is the largest that has only one 0 in its binary representation, and of those not less than 2^32, the smallest one whose 32 least significant bits include fewer than 2 zero bits is Fibonacci(779038816), which exceeds 10^162809483.) - Jon E. Schoenfield, Sep 07 2015

Examples

			55 is 110111 in binary, thus 55 is in the sequence.
		

Crossrefs

Intersection of A030130 and A000045.

Programs

  • Mathematica
    Select[Fibonacci@ Range[0, 120], Last@ DigitCount[#, 2] == 1 &] (* Michael De Vlieger, Sep 07 2015 *)
  • Python
    def count0(x):
        c = 0
        while x:
            c+= 1 - (x&1)
            if c>1:
                return 2
            x>>=1
        return c
    prpr, prev = 0,1
    TOP = 1<<12
    print(0, end=',')
    for i in range(1,TOP):
        if count0(prpr)==1:
            print(prpr, end=',')
        if (i&4095)==0:
            print('.', end=',')
        prpr, prev = prev, prpr+prev

A287014 Bell numbers written in base 2.

Original entry on oeis.org

1, 1, 10, 101, 1111, 110100, 11001011, 1101101101, 1000000101100, 101001010011011, 11100010100000111, 10100101101010101010, 10000000100101101011101, 1101001011101001000010101, 1011011000001110010001111010, 1010010011011100100010111010001
Offset: 0

Views

Author

Vincenzo Librandi, May 22 2017

Keywords

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(Bell(n), 2)): n in [0..20]];
  • Maple
    seq(convert(combinat:-bell(n),binary),n=0..20); # Robert Israel, Aug 12 2018
  • Mathematica
    Table[FromDigits[IntegerDigits[BellB[n], 2]], {n, 0, 30}]

Formula

a(n) = A007088(A000110(n)).

A381704 Fibonacci numbers having a Fibonacci number of 1's in their binary representation.

Original entry on oeis.org

0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 144, 233, 987, 4181, 6765, 17711, 832040, 3524578, 1836311903, 2971215073, 225851433717, 259695496911122585, 3928413764606871165730, 26925748508234281076009, 9969216677189303386214405760200, 638817435613190341905763972389505493
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 04 2025

Keywords

Examples

			F(10) = (55)_10 = (110111)_2 has five 1's in binary, 5 is a Fibonacci number, thus 55 is a term.
F(12) = (144)_10 = (10010000)_2 has two 1's in binary, 2 is a Fibonacci number, thus 144 is a term.
		

Crossrefs

Programs

  • Maple
    isfib:= n -> issqr(5*n^2+4) or issqr(5*n^2-4):
    select(n -> isfib(convert(convert(n,base,2),`+`)), map(combinat:-fibonacci,[0,$2..1000])); # Robert Israel, Mar 13 2025
  • Mathematica
    With[{f = Fibonacci[Range[0, 200]]}, DeleteDuplicates[Select[f, MemberQ[f, DigitCount[#, 2, 1]] &]]] (* Amiram Eldar, Mar 04 2025 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8)); \\ A010056
    lista(nn) = for (n=2, nn, my(f = fibonacci(n)); if (isfib(hammingweight(f)), print1(f, ", "));); \\ Michel Marcus, Mar 04 2025

Extensions

a(1) = 0 inserted by Robert Israel, Mar 13 2025
Previous Showing 11-20 of 25 results. Next