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.

A382178 a(n) is the least k > 1 such that the factorial base expansion of k*n starts with that of n.

Original entry on oeis.org

2, 2, 3, 3, 3, 3, 4, 18, 18, 17, 17, 16, 4, 19, 19, 18, 18, 101, 4, 115, 114, 110, 110, 18, 5, 203, 199, 192, 189, 183, 28, 187, 27, 179, 177, 1341, 180, 176, 26, 170, 168, 165, 1320, 168, 1277, 1251, 162, 159, 5, 1649, 204, 1598, 1579, 1551, 200, 197, 195
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2025

Keywords

Comments

This sequence is well defined (see A382177).

Examples

			The first terms, in decimal and in factorial base, are:
  n   a(n)  fact(n)  fact(a(n)*n)
  --  ----  -------  ------------
   0     2  0        0
   1     2  1        1,0
   2     3  1,0      1,0,0
   3     3  1,1      1,1,1
   4     3  2,0      2,0,0
   5     3  2,1      2,1,1
   6     4  1,0,0    1,0,0,0
   7    18  1,0,1    1,0,1,0,0
   8    18  1,1,0    1,1,0,0,0
   9    17  1,1,1    1,1,1,1,1
  10    17  1,2,0    1,2,0,1,0
  11    16  1,2,1    1,2,1,1,0
  12     4  2,0,0    2,0,0,0
  13    19  2,0,1    2,0,1,0,1
  14    19  2,1,0    2,1,0,1,0
  15    18  2,1,1    2,1,1,0,0
		

Crossrefs

Programs

  • PARI
    A153880(n) = { my (v = 0, f = 1); for (r = 2, oo, if (n==0, return (v);); v += (n%r) * f *= r; n \= r;); }
    a(n) = { if (n==0, return (2)); my (m = n, f = 1, e); for (r = 2, oo, m = A153880(m); f *= r; e = (-m) % n; if (e < f, return ((m+e)/n););); }

Formula

a(n) <= A382177(n).