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

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).

A382184 a(n) is the least k >= 0 such that the factorial base expansion of n starts with that of k while the remaining digits are zeros.

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 1, 7, 3, 9, 10, 11, 4, 13, 5, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1, 25, 7, 27, 28, 29, 3, 31, 9, 33, 34, 35, 10, 37, 11, 39, 40, 41, 42, 43, 44, 45, 46, 47, 4, 49, 13, 51, 52, 53, 5, 55, 15, 57, 58, 59, 16, 61, 17, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2025

Keywords

Examples

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

Crossrefs

Programs

  • PARI
    a(n) = { if (n, my (m = n, s = oo, d); for (r = 2, oo, if (m==0 || s==0, break, d = m%r, s = min(s, r-1-d);); m \= r;); if (s, my (v = 0); for (r = 2, oo, if (n==0, return (v), v += (n%r) * max(0, r-1-s)!; n \= r;);););); return (n); }

Formula

a(n) <= n with equality iff n = 0 or n belongs to A273670.
a(k!) = 1 for any k >= 0.
Showing 1-2 of 2 results.