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

A376795 Numbers k such that k and k+1 are both in A376617.

Original entry on oeis.org

1, 10624, 13824, 1114112, 2625664, 4563999, 6554624, 16843904, 17266688, 17368064, 20003840, 27137024, 32375160, 32679360, 42993664, 44643599, 63732096, 69222464, 69424640, 70083584, 80778752, 84783104, 85458944, 90256383, 92478000, 116469899, 118063231, 121900544
Offset: 1

Views

Author

Amiram Eldar, Oct 04 2024

Keywords

Examples

			10624 is a term since both 10624 and 10625 are in A376617: 10624/A000120(10624) = 2656, 2656/A000120(2656) = 664, and 664/A000120(664) = 166 are integers, and 10625/A000120(10625) = 2125, 2125/A000120(2125) = 425, and 425/A000120(425) = 85 are integers.
		

Crossrefs

Subsequence of A330931, A376617 and A376793.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1], w2, m, n}, IntegerQ[m = k/w] && Divisible[m, w2 = DigitCount[m, 2, 1]] && Divisible[n = m/w2, DigitCount[n, 2, 1]]]; Select[Range[1.2*10^6], q[#] && q[#+1] &]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    is1(k) = {my(sk = s(k)); sk == 0 || sk >= 4;}
    lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

A376616 Binary Niven numbers (A049445) k such that k/wt(k) is also a binary Niven number, where wt(k) = A000120(k) is the binary weight of k.

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 20, 24, 32, 36, 40, 48, 64, 68, 72, 80, 96, 126, 128, 132, 136, 144, 160, 192, 240, 252, 256, 260, 264, 272, 276, 288, 320, 324, 345, 368, 384, 405, 414, 432, 460, 464, 480, 486, 504, 512, 516, 520, 528, 544, 552, 576, 624, 640, 648, 688, 690
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Numbers k such that A376615(k) = 0 or A376615(k) >= 3.
If m is a term then 2^k * m is a term for all k >= 0.

Examples

			12 is a term since 12/wt(12) = 6 is an integer and also 6/wt(6) = 3 is an integer.
		

Crossrefs

Subsequence of A049445.
Subsequences: A000079, A376617, A376618.

Programs

  • Mathematica
    q[k_] := Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[1000], q]
  • PARI
    is(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w));}

A376615 a(n) is the number of iterations that n requires to reach a noninteger under the map x -> x / wt(x), where wt(k) is the binary weight of k (A000120); a(n) = 0 if n is a power of 2.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

The powers of 2 are fixed points of the map, since wt(2^k) = 1 for all k >= 0. Therefore they are arbitrarily assigned the value a(2^k) = 0.
Each number n starts a chain of a(n) integers: n, n/wt(n), (n/wt(n))/wt(n/wt(n)), ..., of them the first a(n)-1 integers are binary Niven numbers (A049445).

Examples

			a(6) = 2 since 6/wt(6) = 3 and 3/wt(3) = 3/2 is a noninteger that is reached after 2 iterations.
a(20) = 3 since 20/wt(20) = 10, 10/wt(10) = 5 and 5/wt(5) = 5/2 is a noninteger that is reached after 3 iterations.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + a[n/bw]]]]; Array[a, 100]
  • PARI
    a(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + a(n/w)));}

Formula

a(n) = 0 if and only if n is in A000079 (by definition).
a(n) = 1 if and only if n is in A065878.
a(n) >= 2 if and only if n is in A049445 \ A000079 (i.e., n is a binary Niven number that is not a power of 2).
a(n) >= 3 if and only if n is in A376616 \ A000079.
a(n) >= 4 if and only if n is in A376617 \ A000079.
a(2*n) >= a(n).
a(3*2^n) = n+1 for n >= 0.
a(n) < A000005(n).

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)); }

A377386 Factorial-base Niven numbers (A118363) k such that m = k/f(k) and m/f(m) are also factorial-base Niven numbers, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 180, 192, 240, 280, 288, 360, 384, 432, 480, 576, 594, 600, 720, 840, 864, 1200, 1215, 1225, 1296, 1344, 1440, 1680, 1728, 1800, 2160, 2240, 2352, 2400, 2520, 2592, 2704, 2730, 2880, 3000
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Examples

			16 is a term since 16/f(16) = 4 is an integer, 4/f(4) = 2 is an integer, and 2/f(2) = 2 is an integer.
		

Crossrefs

Subsequence of A118363 and A377385.
A000142 is a subsequence.
Analogous sequences: A376617 (binary), A377210 (Zeckendorf).

Programs

  • Mathematica
    fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; q[k_] := Module[{f = fdigsum[k], f2, m, n}, IntegerQ[m = k/f] && Divisible[m, f2 = fdigsum[m]] && Divisible[n = m/f2, fdigsum[n]]]; Select[Range[3000], q]
  • PARI
    fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s;}
    is(k) = {my(f = fdigsum(k), f2, m); if(k % f, return(0)); m = k/f; f2 = fdigsum(m); !(m % f2) && !((m/f2) % fdigsum(m/f2)); }

A376619 a(n) is the least odd number k such that A376615(k) = n, or -1 if no such number exists.

Original entry on oeis.org

3, 21, 345, 10625, 74375, 860625, 84189105, 1599592995, 23993894925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Without the restriction to odd numbers the corresponding sequence is 3*2^(n-1) = A007283(n-1).
All the terms above 3 are odd binary Niven numbers (A144302).
a(10) > 10^13, if it exists.

Examples

			  n | The n iterations
  --+------------------------------------------------------
  1 | 3 -> 3/2
  2 | 21 -> 7 -> 7/3
  3 | 345 -> 69 -> 23 -> 23/4
  4 | 10625 -> 2125 -> 425 -> 85 -> 85/4
  5 | 74375 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
  6 | 860625 -> 95625 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + s[n/bw]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 3, i}, While[c < len, i = s[k]; If[v[[i]] == 0, c++; v[[i]] = k]; k += 2]; v]; seq[5]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    lista(len) = {my(v = vector(len), c = 0, k = 3, i); while(c < len, i = s(k); if(v[i] == 0, c++; v[i] = k); k += 2); v;}
Showing 1-6 of 6 results.