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.

A348138 For any number n with factorial base representation (d_1, ..., d_k), for i = 1..k, let f_i be the number of i's in (d_1, ..., d_k); the factorial base representation of a(n) is (f_1, ..., f_k).

Original entry on oeis.org

0, 1, 2, 4, 1, 3, 6, 12, 12, 18, 8, 14, 2, 8, 8, 14, 4, 10, 1, 7, 7, 13, 3, 9, 24, 48, 48, 72, 30, 54, 48, 72, 72, 96, 54, 78, 30, 54, 54, 78, 36, 60, 26, 50, 50, 74, 32, 56, 6, 30, 30, 54, 12, 36, 30, 54, 54, 78, 36, 60, 12, 36, 36, 60, 18, 42, 8, 32, 32, 56
Offset: 0

Views

Author

Rémy Sigrist, Oct 02 2021

Keywords

Comments

Leading zeros in factorial base representation of n are ignored.

Examples

			The first terms, in decimal and in factorial base, are:
  n   a(n)  f(n)  f(a(n))
  --  ----  ----  -------
   0     0     0        0
   1     1     1        1
   2     2    10       10
   3     4    11       20
   4     1    20        1
   5     3    21       11
   6     6   100      100
   7    12   101      200
   8    12   110      200
   9    18   111      300
  10     8   120      110
		

Crossrefs

Programs

  • PARI
    a(n) = { my (f=[]); for (r=2, oo, if (n==0, return (sum(k=1, #f, f[k]*(#f-k+1)!)), f=concat(f, 0); my (d=n%r); n\=r; if (d, f[d]++))) }

Formula

a(n) = n iff n = 0 or n is a factorial number (A000142).
A034968(a(n)) = A060130(n).
a(A153880(n)) = A153880(a(n)).