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 25 results. Next

A350700 a(n) is the number of 1's minus the number of 0's in A004685(n).

Original entry on oeis.org

-1, 1, 1, 0, 2, 1, -2, 2, 1, -2, 4, 1, -4, 2, 3, -2, 6, 3, -4, -3, 3, -2, 1, 7, -4, -5, 1, 4, 3, 5, -4, 1, -4, 4, 1, -2, 0, 3, -6, -2, 5, 6, 0, 3, 6, -1, 11, -6, -9, 3, 2, -1, -1, -2, -5, 6, 4, -7, 8, 0, -9, -4, 10, 3, -4, 6, -7, 6, -17, -1, -2, -5, 1, 4, -3
Offset: 0

Views

Author

Karl-Heinz Hofmann, Jan 18 2022

Keywords

Examples

			A004685(0) = 0; this term has 0 ones and 1 zero. So a(0) = 0 - 1 = -1.
A004685(7) = 1101; this term has 3 ones and 1 zero. So a(7) = 3 - 1 = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Subtract @@ DigitCount[Fibonacci[n], 2, {1, 0}]; Array[a, 75, 0] (* Amiram Eldar, Jan 22 2022 *)
  • Python
    from sympy import fibonacci
    print([(bin(fibonacci(n))[2:].count("1") - bin(fibonacci(n))[2:].count("0")) for n in range (0,100)])

Formula

a(n) = A145037(A000045(n)) for n >= 1.
a(n) = 0 if and only if n is in A214852. - Amiram Eldar, Jan 22 2022

A036284 Periodic vertical binary vectors of Fibonacci numbers.

Original entry on oeis.org

6, 24, 1440, 5728448, 92568198012160, 26494530374406845814111659520, 2095920895719545919920115988669687683503034097906010941440, 13128614603426246034591796912897206548807135027496968025827278400248602613784037111736380004928525614173642247188480
Offset: 0

Views

Author

Antti Karttunen, Nov 01 1998

Keywords

Comments

The sequence can be also computed with a recurrence that does not explicitly refer to Fibonacci numbers. See the given Maple and C programs.
Conjecture: For n>=1, each term a(n), when considered as a GF(2)[X]-polynomial, is divisible by GF(2)[X] -polynomial (x^3 + 1) ^ A000225(n-1). If this holds, then for n>=1, a(n) = A048720bi(A136380(n),A048723bi(9,A000225(n-1))). Conjecture 2: there is also one extra (x^1 + 1) factor present, see A136384.

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 a period of A007283(n): 3, 6, 12, 24, ... (See also A001175). This sequence is formed from those bits: 011, reversed is 110, is binary for 6, thus a(0) = 6. 000110, reversed is 11000, is binary for 24, thus a(1) = 24, 000001011010, reversed is 10110100000, is binary for 1440, thus a(2) = 1440.
		

Crossrefs

Same sequence in octal base: A036285. Bits reversed: A036286. See also A136378, A136379, A136380, A136382, A136384, A037096, A037093, A000045.

Programs

  • Maple
    A036284:=proc(n) option remember; local a, b, c, i, j, k, l, s, x, y, z; if (0 = n) then (6) else a := 0; b := 0; s := 0; x := 0; y := 0; k := 3*(2^(n-1)); l := 3*(2^n); j := 0; for i from 0 to l do z := bit_i(A036284(n-1),(j)); c := (a + b + (`if`((x = y),x,(z+1))) mod 2); if(c <> 0) then s := s + (2^i); fi; a := b; b := c; x := y; y := z; j := j + 1; if(j = k) then j := 0; fi; od; RETURN(s); fi; end:
    bit_i := (x,i) -> `mod`(floor(x/(2^i)),2);
  • Mathematica
    a[n_] := Sum[Mod[Fibonacci[k]/2^n // Floor, 2]* 2^k, {k, 0, 3*2^n - 1}]; Table[a[n], {n, 0, 7}] (* Jean-François Alcover, Mar 04 2016 *)

Formula

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

Extensions

Entry revised Dec 29 2007

A037093 "Sloping binary representation" of Fibonacci numbers, slope = +1.

Original entry on oeis.org

0, 1, 3, 14, 57, 229, 916, 7761, 29567, 117474, 469113, 3973641, 15138352, 60146777, 240187355, 2070207870, 7733090689, 30791909229, 260408711716, 991495872825, 3942106110215, 15739612088946, 133333733918417
Offset: 0

Views

Author

Antti Karttunen, Jan 28 1999

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)
and one starts collecting their bits from column-0 to SW-direction (from the least to the most significant end), one gets 000... (0), ...00001 (1), ...00011 (3), ...001110 (14), etc. (See A102370 for similar transformation done on nonnegative integers).
		

Crossrefs

Same sequence in octal: A037098. Cf. also: A102370, A000045, A037094-A037095, A036284.

Formula

a(n) := Sum(bit_n(A000045(n+i), i)*(2^i), i=0..inf) [ bit_n := (x, n) -> `mod`(floor(x/(2^n)), 2); ]
In practice, n can be used as an upper limit instead of infinity.

Extensions

Entry revised Dec 29 2007

A272170 Second most significant bit of Fibonacci numbers > 1 written in base 2.

Original entry on oeis.org

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

Views

Author

Andres Cicuttin, Apr 21 2016

Keywords

Comments

It is conjectured that there are no more than two consecutive "0's" or “1’s” (tested up to n=10^5). The sequence looks quasiperiodic and its Fourier spectrum seems to have a fractal structure.

Examples

			(second MSB in parenthesis)
  n   A000045(n)      A004685(n)
  3      2       ->   1(0)
  4      3       ->   1(1)
  5      5       ->   1(0)1
  6      8       ->   1(0)00
  7      13      ->   1(1)01
  8      21      ->   1(0)101
  9      34      ->   1(0)0010
  10     55      ->   1(1)0111
...
		

Crossrefs

Programs

  • Mathematica
    nmax = 120; Table[IntegerDigits[Fibonacci[j], 2][[2]], {j, 3, nmax}]
  • PARI
    a(n) = binary(fibonacci(n))[2]; \\ Michel Marcus, Apr 25 2016
    
  • Python
    A272170_list, a, b = [], 1 ,1
    for n in range(3,10001):
        a, b = b, a+b
        A272170_list.append(int(bin(b)[3])) # Chai Wah Wu, Feb 07 2018

Formula

a(n) = floor(A000045(n)/(2^(ceiling(log_2(A000045(n) + 1)) - 2))) - 2.
a(n) = A079944(A000045(n)-2). - Michel Marcus, Apr 22 2016

A030324 Triangle read by rows, where row k consists of the binary digits of Fibonacci(k+1).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Triangle starts
1
1, 0
1, 1
1, 0, 1
1, 0, 0, 0
1, 1, 0, 1
1, 0, 1, 0, 1
1, 0, 0, 0, 1, 0
		

Crossrefs

Cf. A000045, A004685, A272170 (second column).

Programs

  • Maple
    for n from 2 to 30 do
      ListTools:-Reverse(convert(combinat:-fibonacci(n),base,2))
    od; # Robert Israel, Sep 12 2018
  • Mathematica
    Flatten[Map[IntegerDigits[#, 2] &, Table[Fibonacci[n], {n, 50}], {1}]] (* Ben Branman, Feb 14 2011 *)
    IntegerDigits[#,2]&/@Fibonacci[Range[2,20]]//Flatten (* Harvey P. Dale, May 29 2021 *)

Extensions

Edited by Robert Israel, Sep 12 2018

A222601 Conjectured number of Fibonacci numbers with exactly n 0-bits in their binary representation.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Mar 08 2013

Keywords

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A214853 (one 0-bit), A222602.

Programs

  • Mathematica
    f = Fibonacci[Range[0,100]]; Table[Length[Select[f, Count[IntegerDigits[#, 2], 0] == n &]], {n, 0, 20}]

A222602 Irregular triangle of conjectured Fibonacci numbers with exactly n 0-bits in their binary representation.

Original entry on oeis.org

1, 1, 3, 0, 2, 5, 13, 55, 21, 987, 8, 89, 233, 377, 34, 1597, 28657, 6765, 144, 610, 17711, 196418, 514229, 2584, 4181, 10946, 121393, 317811, 3524578, 46368, 1346269, 1836311903, 75025, 5702887, 24157817, 102334155, 165580141, 832040, 14930352, 701408733
Offset: 0

Views

Author

T. D. Noe, Mar 08 2013

Keywords

Examples

			The irregular triangle begins
{1, 1, 3},
{0, 2, 5, 13, 55},
{21, 987},
{8, 89, 233, 377},
{34, 1597, 28657},
{6765},
{144, 610},
{17711, 196418, 514229},
{2584, 4181, 10946, 121393, 317811},
{3524578}, {46368, 1346269, 1836311903},
{75025, 5702887, 24157817, 102334155, 165580141},
{832040, 14930352, 701408733}
		

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A214853 (one 0-bit), A222601.

Programs

  • Mathematica
    f = Fibonacci[Range[0,1000]]; Table[Select[f, Count[IntegerDigits[#, 2], 0] == n &], {n, 0, 20}]

A222296 Irregular triangle read by rows: row n lists the Fibonacci numbers with exactly n 1's in their binary representation.

Original entry on oeis.org

0, 1, 1, 2, 8, 3, 5, 34, 144, 13, 21
Offset: 0

Views

Author

T. D. Noe, Feb 22 2013

Keywords

Comments

Besides those listed in Example section, there are no additional terms with small number of 1's in the first 10^12 Fibonacci numbers. In particular, if A000120(Fibonacci(n)) < 100, then n <= 319 or n > 10^12. - Charles R Greathouse IV, Mar 06 2014
For the theorem about S-units that Noam Elkies quotes (in the MathOverflow link), see Chapter 1 of Storey-Tijdemann, 1986. - N. J. A. Sloane, Jan 28 2017

Examples

			The irregular table begins
{0},
{1, 1, 2, 8},
{3, 5, 34, 144},
{13, 21, ...}.
It is conjectured that the previous (n=3) row is complete, and that the subsequent rows are:
{89, 610, 2584},
{55, 233, 4181},
{377, 10946, 46368, 75025},
{1597},
{987, 6765, 17711, 832040},
{121393, 2178309},
{39088169},
{28657, 196418, 317811, 1346269, 9227465},
{514229, 5702887, 14930352, 63245986, 4807526976},
{3524578, 2971215073}
...
		

References

  • T. N. Shorey and R. Tijdeman, Exponential Diophantine Equations, Cambridge Tracts in Mathematics, 1986.

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A221158 (weight 2), A222295, A222601, A222602, A222757, A222758.

Programs

  • Mathematica
    f = Fibonacci[Range[0,100]]; Table[Select[f, Total[IntegerDigits[#, 2]] == n &], {n, 0, 20}]
  • PARI
    row(n)=my(k=-1,t); while(1,t=fibonacci(k++); if(hammingweight(t)==n, print1(t", "))) \\ Charles R Greathouse IV, Mar 04 2014

Extensions

a(9)-a(10) from Noam D. Elkies, via Charles R Greathouse IV, Mar 04 2014
Truncated to established terms by Max Alekseyev, May 13 2014
Edited by Max Alekseyev, Sep 08 2016

A222757 Irregular table of conjectured indices of Fibonacci numbers with exactly n 0-bits in their binary representation.

Original entry on oeis.org

1, 2, 4, 0, 3, 5, 7, 10, 8, 16, 6, 11, 13, 14, 9, 17, 23, 20, 12, 15, 22, 27, 29, 18, 19, 21, 26, 28, 33, 24, 31, 46, 25, 34, 37, 40, 41, 30, 36, 44, 32, 35, 43, 39, 42, 49, 38, 45, 50, 55, 58, 62, 56, 51, 52, 47, 53, 65, 59, 63, 67, 48, 54, 57, 61, 73
Offset: 0

Views

Author

T. D. Noe, Mar 11 2013

Keywords

Comments

Every nonnegative integer appears.

Examples

			The irregular table begins
{1, 2, 4},
{0, 3, 5, 7, 10},
{8, 16},
{6, 11, 13, 14},
{9, 17, 23},
{20},
{12, 15},
{22, 27, 29},
{18, 19, 21, 26, 28},
{33},
{24, 31, 46},
{25, 34, 37, 40, 41}
		

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A222601, A222602, A222758.

Programs

  • Mathematica
    nn = 100; f = Fibonacci[Range[0, nn]]; t2 = Transpose[{Range[0, nn], f}]; Table[Select[Range[nn + 1], Count[IntegerDigits[t2[[#, 2]], 2], 0] == n &] - 1, {n, 0, nn/5}]
    Insert[Flatten[Module[{nn=100,dc},dc=DigitCount[Fibonacci[Range[nn]],2,0];Table[Position[dc,n],{n,0,30}]]],0,4] (* Harvey P. Dale, Mar 17 2024 *)

A222758 Irregular table of conjectured indices of Fibonacci numbers with exactly n 1-bits in their binary representation.

Original entry on oeis.org

0, 1, 2, 3, 6, 4, 5, 9, 12, 7, 8, 11, 15, 18, 10, 13, 19, 14, 21, 24, 25, 17, 16, 20, 22, 30, 26, 32, 38, 23, 27, 28, 31, 35, 29, 34, 36, 39, 48, 33, 47, 37, 42, 45, 68, 40, 43, 54, 57, 60, 41, 51, 52, 53, 44, 49, 50, 61, 66, 59, 64, 46, 56, 55, 71, 77
Offset: 0

Views

Author

T. D. Noe, Mar 11 2013

Keywords

Comments

Every nonnegative integer appears.

Examples

			The irregular table begins
{0},
{1, 2, 3, 6},
{4, 5, 9, 12},
{7, 8},
{11, 15, 18},
{10, 13, 19},
{14, 21, 24, 25},
{17},
{16, 20, 22, 30},
{26, 32},
{38},
{23, 27, 28, 31, 35}
		

Crossrefs

Cf. A004685 (Fibonacci numbers in binary), A222601, A222602, A222757.

Programs

  • Mathematica
    nn = 100; f = Fibonacci[Range[0, nn]]; t2 = Transpose[{Range[0, nn], f}]; Table[Select[Range[nn + 1], Count[IntegerDigits[t2[[#, 2]], 2], 1] == n &] - 1, {n, 0, nn/5}]
Showing 1-10 of 25 results. Next