OFFSET
0,8
COMMENTS
Row n gives exponents for successive primes 2, 3, 5, 7, 11, etc., in the prime factorization of A276076(n). - Antti Karttunen, Mar 11 2024
LINKS
Seiichi Manyama, Rows n = 0..2000, flattened
Wikipedia, Factorial number system.
FORMULA
T(n,k) = floor(n/k!) mod k+1. - Tom Edgar, Aug 15 2018
EXAMPLE
n | 1 2 6
---+---------
0 | 0;
1 | 1;
2 | 0, 1;
3 | 1, 1;
4 | 0, 2;
5 | 1, 2;
6 | 0, 0, 1;
7 | 1, 0, 1;
8 | 0, 1, 1;
9 | 1, 1, 1;
10 | 0, 2, 1;
11 | 1, 2, 1;
12 | 0, 0, 2;
13 | 1, 0, 2;
14 | 0, 1, 2;
15 | 1, 1, 2;
16 | 0, 2, 2;
17 | 1, 2, 2;
18 | 0, 0, 3;
19 | 1, 0, 3;
MATHEMATICA
row[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, AppendTo[s, r]; m++]; s]; row[0] = {0}; Array[row, 31, 0] // Flatten (* Amiram Eldar, Mar 11 2024 *)
PROG
(Sage) terms=25; print([0]+[x for sublist in [[floor(n/factorial(i))%(i+1) for i in [k for k in [1..n] if factorial(k)<=n]] for n in [1..terms]] for x in sublist]) # Tom Edgar, Aug 15 2018
CROSSREFS
KEYWORD
nonn,tabf,base
AUTHOR
Seiichi Manyama, Mar 25 2018
STATUS
approved