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-14 of 14 results.

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

A353988 Numbers k such that Fibonacci(k) is a binary Niven number (A049445).

Original entry on oeis.org

1, 2, 3, 6, 8, 9, 10, 12, 18, 24, 30, 36, 48, 56, 60, 100, 120, 144, 150, 168, 240, 270, 288, 300, 324, 330, 336, 360, 444, 540, 594, 600, 624, 720, 750, 840, 864, 896, 900, 936, 1080, 1152, 1200, 1210, 1360, 1404, 1632, 1720, 1921, 2028, 2400, 2520, 2552, 2864
Offset: 1

Views

Author

Amiram Eldar, May 13 2022

Keywords

Comments

Numbers k such that A011373(k) | A000045(k).

Examples

			1 is a term since A000045(1) = A011373(1) = 1 and 1 | 1.
10 is a term since A000045(10) = 55, A011373(1) = 5 and 5 | 55.
		

Crossrefs

Cf. A000045, A000120, A011373, A049445, A117774, A337448 (decimal analog).

Programs

  • Mathematica
    Select[Range[3000], Divisible[(f = Fibonacci[#]), DigitCount[f, 2, 1]] &]
  • PARI
    isok(k) = my(f=fibonacci(k)); ! (f % hammingweight(f)); \\ Michel Marcus, May 13 2022

A374962 Numbers k such that the number of terms in the Zeckendorf representation of 2^k equals the binary weight of Fibonacci(k).

Original entry on oeis.org

1, 3, 4, 7, 8, 13, 14, 20, 26, 50, 55, 58, 90, 140, 270, 314, 603
Offset: 1

Views

Author

Amiram Eldar, Jul 25 2024

Keywords

Comments

Numbers k such that A007895(A000079(k)) = A000120(A000045(k)), or equivalently A020908(k) = A011373(k).
The corresponding values of A020908(k) = A011373(k) are 1, 1, 2, 3, 3, 5, 6, 8, 9, 18, 22, 24, 33, 53, 106, 122, 232, ... .
a(18) > 63000, if it exists.
a(18) > 333333, if it exists. - Lucas A. Brown, Aug 13 2024

Examples

			  n | k = a(n) | 2^k | A014417(2^k) | F(k) | A007088(F(k)) | Number of 1's
  --+----------+-----+--------------+------+---------------+--------------
  1 |        1 |   2 |           10 |    1 |             1 |             1
  2 |        3 |   8 |        10000 |    2 |            10 |             1
  3 |        4 |  16 |       100100 |    3 |            11 |             2
  4 |        7 | 128 |   1010001000 |   13 |          1101 |             3
  5 |        8 | 256 | 100001000010 |   21 |         10101 |             3
		

Crossrefs

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    Select[Range[700], z[2^#] == DigitCount[Fibonacci[#], 2, 1] &]
  • PARI
    A007895(n)=if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s); \\ Charles R Greathouse IV at A007895
    is(k) = A007895(2^k) == hammingweight(fibonacci(k));

A379835 Number of 1's in binary expansion of Lucas(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 2, 4, 5, 3, 6, 5, 3, 3, 6, 5, 7, 9, 6, 5, 9, 10, 9, 11, 6, 9, 7, 10, 15, 11, 10, 15, 13, 11, 11, 15, 15, 12, 15, 17, 15, 11, 14, 15, 20, 15, 18, 17, 13, 11, 22, 20, 23, 23, 19, 22, 22, 22, 28, 25, 23, 19, 25, 27, 27, 24, 26, 25, 23, 27, 23, 27
Offset: 0

Views

Author

Vincenzo Librandi, Jan 05 2025

Keywords

Examples

			a(10) = 6 because Lucas(10) = 123 is 1111011_2, which has 6 one bits.
		

Crossrefs

Programs

  • Magma
    [&+Intseq(Lucas(n), 2): n in [0..100]];
  • Mathematica
    Table[DigitCount[LucasL[n],2][[1]],{n,0,200}]

Formula

a(n) = A000120(A000032(n)).
Previous Showing 11-14 of 14 results.