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

A328208 Zeckendorf-Niven numbers: numbers divisible by the number of terms in their Zeckendorf representation (A007895).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 13, 14, 16, 18, 21, 22, 24, 26, 27, 30, 34, 36, 42, 45, 48, 55, 56, 58, 60, 66, 68, 69, 72, 76, 78, 80, 81, 84, 89, 90, 92, 93, 94, 96, 99, 102, 105, 108, 110, 111, 116, 120, 126, 132, 135, 140, 144, 146, 150, 152, 153, 156, 159, 162
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Examples

			12 is in the sequence since A007895(12) = 3 and 3 is a divisor of 12.
		

References

  • Andrew Ray, On the natural density of the k-Zeckendorf Niven numbers, Ph.D. dissertation, Central Missouri State University, 2005.

Crossrefs

Programs

  • Maple
    fib:= combinat:-fibonacci:
    phi:= 1/2 + sqrt(5)/2:
    fibapp:= n -> phi^n/sqrt(5):
    invfib := proc(x::posint)
      local q, n;
      q:= evalf((ln(x+1/2) + ln(5)/2)/ln(phi));
      n:= floor(q);
      if fib(n) <= x then
        while fib(n+1) <= x do
          n := n+1
        end do
      else
        while fib(n) > x do
          n := n-1
        end do
      end if;
      n
    end proc:
    zeck:= proc(x) local n;
     if x = 0 then 0
     else
       n:= invfib(x);
       F[n] + zeck(x-fib(n));
     fi
    end proc:
    filter:= n -> n mod nops(zeck(n)) = 0:
    select(filter, [$1..200]); # Robert Israel, Oct 25 2019
  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; aQ[n_] := Divisible[n, z[n]]; Select[Range[1000], aQ] (* after Alonso del Arte at A007895 *)

A339211 Zeckendorf self numbers: numbers not of the form k + A007895(k).

Original entry on oeis.org

1, 5, 7, 10, 19, 21, 27, 29, 32, 36, 40, 42, 45, 54, 61, 63, 66, 75, 77, 83, 85, 88, 95, 97, 100, 109, 111, 117, 119, 122, 126, 130, 132, 135, 144, 146, 150, 152, 155, 164, 166, 172, 174, 177, 181, 185, 187, 190, 199, 206, 208, 211, 220, 222, 228, 230, 233, 239
Offset: 1

Views

Author

Amiram Eldar, Nov 27 2020

Keywords

Comments

Analogous to self numbers (A003052) using the Zeckendorf representation (A014417) instead of decimal expansion.
The numbers of terms that do not exceed 10^k, for k = 0, 1, ..., are 1, 4, 25, 236, 2351, 23495, 234949, 2349463, 23494586, 234945839, 2349458364, ... . Apparently, the asymptotic density of this sequence exists and equals 0.23494583... . - Amiram Eldar, Aug 08 2025

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    z[n_] := n + Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; m = 250; Complement[Range[m], Array[z, m]] (* after Alonso del Arte at A007895 *)

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2018

Keywords

Comments

From Amiram Eldar, Aug 09 2024: (Start)
The number of factors of n of the form p^Fibonacci(k), where p is a prime and k >= 2, when the factorization is uniquely done using the Zeckendorf representation of the exponents in the prime factorization of n.
Equivalently, the number of Zeckendorf-infinitary divisors of n (defined in A318465) that are prime powers (A246655). (End)

Crossrefs

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; a[n_] := Total[z /@ FactorInteger[n][[;; , 2]]]; a[1] = 0; Array[a, 100] (* Amiram Eldar, May 15 2023 *)
  • 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); }
    A318464(n) = vecsum(apply(e -> A007895(e),factor(n)[,2]));

Formula

a(n) = A007814(A318465(n)).
a(n) = A001222(A318469(n)).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{k>=2} (A007895(k)-A007895(k-1)) * P(k) = 0.05631817952062180045..., where P(s) is the prime zeta function. - Amiram Eldar, Oct 09 2023

A377209 Zeckendorf-Niven numbers (A328208) k such that k/z(k) is also a Zeckendorf-Niven number, where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 13, 16, 21, 24, 26, 30, 34, 36, 42, 48, 55, 60, 66, 68, 72, 78, 81, 89, 90, 108, 110, 120, 126, 135, 144, 152, 168, 178, 180, 192, 204, 207, 233, 240, 243, 264, 270, 276, 288, 300, 304, 312, 324, 330, 336, 360, 377, 380, 390, 396, 408
Offset: 1

Views

Author

Amiram Eldar, Oct 20 2024

Keywords

Examples

			12 is a term since 12/z(12) = 4 is an integer and also 4/z(4) = 2 is an integer.
		

Crossrefs

Cf. A007895, A376616 (binary analog).
Subsequence of A328208.
Subsequences: A000045, A377210.

Programs

  • Mathematica
    zeck[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    q[k_] := Module[{z = zeck[k]}, Divisible[k, z] && Divisible[k/z, zeck[k/z]]]; Select[Range[400], q]
  • PARI
    zeck(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) = {my(z = zeck(k)); !(k % z) && !((k/z) % zeck(k/z)); }

A377210 Zeckendorf-Niven numbers (A328208) k such that m = k/z(k) and m/z(m) are also Zeckendorf-Niven numbers, where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 13, 16, 21, 24, 26, 30, 34, 42, 48, 55, 60, 68, 78, 89, 110, 120, 126, 144, 178, 180, 192, 204, 233, 243, 264, 270, 288, 300, 312, 324, 330, 360, 377, 466, 480, 534, 540, 576, 600, 610, 621, 672, 720, 754, 768, 864, 987, 1020, 1056
Offset: 1

Views

Author

Amiram Eldar, Oct 20 2024

Keywords

Examples

			24 is a term since 24/z(24) = 12, 12/z(12) = 4 and 4/z(4) = 2 are all integers.
		

Crossrefs

Cf. A000045 (a subsequence), A007895, A376617 (binary analog).
Subsequence of A328208 and A377209.

Programs

  • Mathematica
    zeck[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    q[k_] := Module[{z = zeck[k], z2, m, n}, IntegerQ[m = k/z] && Divisible[m, z2 = zeck[m]] && Divisible[n = m/z2, zeck[n]]]; Select[Range[1000], q]
  • PARI
    zeck(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) = {my(z = zeck(k), z2, m); if(k % z, return(0)); m = k/z; z2 = zeck(m); !(m % z2) && !((m/z2) % zeck(m/z2)); }

A220115 a(n) = A000120(n) - A007895(n), the number of 1's in binary expansion of n minus the number of terms in Zeckendorf representation of n.

Original entry on oeis.org

0, 0, 0, 1, -1, 1, 0, 1, 0, 0, 0, 1, -1, 2, 1, 2, -1, -1, 0, 0, -1, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, -2, -2, 1, 1, 0, 1, 0, 2, -1, 0, 1, 1, 0, 1, 0, 3, -1, 0, 0, 0, 0, 0, 0, 4, 1, 2, 2, 2, 2, 2, 2, 4, -2, -1, -1, -1, 0, 0, 0, 1, -2, 0, -1, 0, 1, 1, 1, 2, -2
Offset: 0

Views

Author

Alex Ratushnyak, Dec 05 2012

Keywords

Examples

			a(4) = A000120(4) - A007895(4) = 1 - 2 = -1.
		

Crossrefs

Programs

  • Mathematica
    zeck = DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1]; DigitCount[Range[0, Length[zeck]-1], 2, 1] - zeck (* Jean-François Alcover, Jan 25 2018 *)

Formula

a(n) = A000120(n) - A007895(n).

A324905 a(n) = A007895(A003965(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 3, 2, 2, 1, 2, 3, 2, 3, 3, 1, 3, 1, 3, 2, 2, 3, 2, 1, 2, 2, 3, 1, 3, 1, 3, 3, 2, 1, 3, 3, 3, 2, 3, 1, 4, 3, 3, 2, 2, 1, 2, 1, 2, 4, 3, 3, 3, 1, 3, 2, 4, 1, 4, 1, 2, 4, 3, 3, 3, 1, 4, 3, 2, 1, 3, 3, 2, 2, 3, 1, 2, 3, 3, 2, 2, 3, 3, 1, 3, 4, 3, 1, 3, 1, 3, 4
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2019

Keywords

Crossrefs

Programs

  • PARI
    A003965(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = fibonacci(2+primepi(f[i, 1]))); factorback(f); };
    A007895(n) = { my(s=0); while(n>0, s++; n -= fibonacci(1+A072649(n))); (s); }
    A072649(n) = { my(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2); }; \\ From A072649
    A324905(n) = A007895(A003965(n));

Formula

a(n) = A007895(A003965(n)).

A324907 a(n) = A007895(A113175(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 3, 2, 1, 1, 1, 3, 1, 2, 1, 1, 2, 1, 1, 3, 1, 3, 2, 1, 1, 2, 3, 1, 2, 1, 1, 3, 1, 4, 2, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 3, 4, 1, 2, 1, 3, 1, 1, 4, 3, 3, 1, 2, 1, 1, 4
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2019

Keywords

Crossrefs

Programs

  • PARI
    A113175(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = fibonacci(f[i, 1])); factorback(f); };
    A007895(n) = { my(s=0); while(n>0, s++; n -= fibonacci(1+A072649(n))); (s); }
    A072649(n) = { my(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2); }; \\ From A072649
    A324907(n) = A007895(A113175(n));

Formula

a(n) = A007895(A113175(n)).
a(2n) = a(n).

A358978 Numbers that are coprime to the number of terms in their Zeckendorf representation (A007895).

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 13, 15, 17, 19, 20, 21, 23, 25, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 47, 49, 50, 51, 52, 53, 55, 57, 59, 61, 62, 63, 64, 65, 67, 70, 71, 73, 75, 77, 79, 83, 85, 87, 88, 89, 91, 95, 97, 98, 100, 101, 103, 104, 107, 109
Offset: 1

Views

Author

Amiram Eldar, Dec 07 2022

Keywords

Comments

First differs from A063743 at n = 22.
Numbers k such that gcd(k, A007895(k)) = 1.
The Fibonacci numbers (A000045) are terms. These are also the only Zeckendorf-Niven numbers (A328208) in this sequence.
Includes all the prime numbers.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 7, 61, 614, 6028, 61226, 606367, 6041106, 61235023, 612542436, 6034626175, 60093287082, 609082612171, ... . Conjecture: The asymptotic density of this sequence exists and equals 6/Pi^2 = 0.607927... (A059956), the same as the density of A094387.

Examples

			3 is a term since A007895(3) = 1, and gcd(3, 1) = 1.
		

Crossrefs

Subsequences: A000040, A000045.
Similar sequences: A094387, A339076, A358975, A358976, A358977.

Programs

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

A179180 Partial sums of A007895.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 8, 10, 11, 13, 15, 17, 20, 21, 23, 25, 27, 30, 32, 35, 38, 39, 41, 43, 45, 48, 50, 53, 56, 58, 61, 64, 67, 71, 72, 74, 76, 78, 81, 83, 86, 89, 91, 94, 97, 100, 104, 106, 109, 112, 115, 119, 122, 126, 130, 131, 133, 135, 137, 140, 142, 145
Offset: 0

Views

Author

Walt Rorie-Baety, Jun 30 2010

Keywords

Comments

Total number of summands in Zeckendorf representations of all the numbers 1,2,...,n (for n>0); see the conjecture at A214979. - Clark Kimberling, Oct 23 2012

Examples

			For n = 6, a(n) = 1+1+1+2+1+2 = 8.
		

Crossrefs

Programs

  • Mathematica
    s = Reverse[Table[Fibonacci[n + 1], {n, 1, 70}]];
    t2 = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]][[2, 1]], # > 0 &]] &, Range[z]]; v[n_] := Sum[t2[[k]], {k, 1, n}];
    v1 = Table[v[n], {n, 1, z}]
    (* Peter J. C. Moses, Oct 18 2012 *)
    DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1] // Accumulate (* Jean-François Alcover, Jan 25 2018 *)

Formula

a(n) ~ c * n * log(n), where c = (phi-1)/(sqrt(5)*log(phi)) = 0.574369... and phi is the golden ratio (A001622) (Ballot, 2013). - Amiram Eldar, Dec 09 2021

Extensions

Corrected term a(17); the working list of the terms were not in order. Walt Rorie-Baety, Jun 30 2010
Extended by Clark Kimberling, Oct 23 2012
Showing 1-10 of 152 results. Next