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

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

Original entry on oeis.org

1, 3, 8, 27, 135, 1215, 15795, 328050, 4920750, 127764000, 5826168000, 126097171200
Offset: 0

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Comments

a(12) > 2.2*10^12, if it exists.
a(12) <= 5160284236800, a(13) <= 227052506419200. - David A. Corneth, Oct 27 2024
All the terms except for 3 are factorial-base Niven numbers (A118363).

Examples

			  n | The n iterations
  --+------------------------------------------------------
  1 | 3 -> 3/2
  2 | 8 -> 4 -> 2 = 2!
  3 | 27 -> 9 -> 3 -> 3/2
  4 | 135 -> 27 -> 9 -> 3 -> 3/2
  5 | 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2
  6 | 15795 -> 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2
  7 | 328050 -> 18225 -> 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2
		

Crossrefs

Analogous sequences: A376619 (binary), A377211 (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]; f[n_] := f[n] = Module[{s = fdigsum[n]}, If[s == 1, 0, If[!Divisible[n, s], 1, 1 + f[n/s]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 1, i}, While[c < len, i = f[k] + 1; If[v[[i]] == 0, c++; v[[i]] = k]; k++]; v]; seq[8]
  • 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;}
    f(n) = {my(s = fdigsum(n)); if(s == 1, 0, if(n % s, 1, 1 + f(n/s)));}
    lista(len) = {my(v = vector(len), c = 0, k = 1, i); while(c < len, i = f(k) + 1; if(v[i] == 0, c++; v[i] = k); k++); v; }

A377385 Factorial-base Niven numbers (A118363) k such that k/f(k) is also a factorial-base Niven number, 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, 27, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 168, 175, 180, 192, 208, 210, 240, 280, 288, 336, 360, 384, 420, 432, 468, 480, 490, 572, 576, 594, 600, 630, 720, 732, 740, 750, 780, 784, 819, 840, 846, 861, 864, 888, 900, 924, 936, 945, 980, 984
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Examples

			8 is a term since 8/f(8) = 4 is an integer and also 4/f(4) = 2 is an integer.
		

Crossrefs

Subsequence of A118363.
Subsequences: A000142, A377386.
Analogous sequences: A376616 (binary), A377209 (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]}, Divisible[k, f] && Divisible[k/f, fdigsum[k/f]]]; Select[Range[1000], 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)); !(k % f) && !((k/f) % fdigsum(k/f));}

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)); }
Showing 1-3 of 3 results.