%I #6 Dec 07 2021 07:25:28
%S 1,1,1,0,2,1,3,1,3,3,1,3,0,5,0,0,4,4,1,0,4,4,1,2,1,4,5,6,0,5,3,6,0,4,
%T 2,2,6,2,1,1,5,3,0,3,0,3,1,3,5,5,6,0,6,7,5,2,4,3,7,6,7,2,1,7,6,2,3,5,
%U 0,1,2,4,4,1,5,6,0,3,0,5,4,3,0,3,3,5,6,6,3
%N Irregular table read by rows; the first row contains 1; for n > 1, the n-th row contains the base-n digits of the number whose base-(n-1) expansion is the concatenation of the previous rows.
%C This sequence generalizes A309737 beyond the decimal base.
%H Rémy Sigrist, <a href="/A349918/a349918.gp.txt">PARI program for A349918</a>
%e Table begins:
%e 1;
%e 1;
%e 1, 0;
%e 2, 1, 3;
%e 1, 3, 3, 1, 3, 0;
%e 5, 0, 0, 4, 4, 1, 0, 4, 4, 1, 2;
%e 1, 4, 5, 6, 0, 5, 3, 6, 0, 4, 2, 2, 6, 2, 1, 1, 5, 3, 0, 3, 0, 3;
%e ...
%o (PARI) See Links section.
%o (Python)
%o from sympy.ntheory.digits import digits
%o def fromdigits(d, b):
%o n = 0
%o for di in d: n *= b; n += di
%o return n
%o def auptor(rows):
%o alst = [1]
%o for n in range(2, rows+1):
%o alst.extend(digits(fromdigits(alst, n-1), n)[1:])
%o return alst
%o print(auptor(8)) # _Michael S. Branicky_, Dec 05 2021
%Y Cf. A309737.
%K nonn,tabf,base
%O 1,5
%A _Rémy Sigrist_, Dec 05 2021
|