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