login
Base conversion sequence: a(1) = 1; a(n) is the concatenation of all the previous terms, evaluated in base n-1, written in base n.
2

%I #24 Dec 07 2021 07:24:07

%S 1,1,10,213,133130,50044104412,1456053604226211530303,

%T 1355606752437672176235012441560305430335663,

%U 211028537470000781652623227715306164580285678106041347266088244412145807188883237767

%N Base conversion sequence: a(1) = 1; a(n) is the concatenation of all the previous terms, evaluated in base n-1, written in base n.

%C This will only work for n <= 10. To get a sequence that is defined for all n, it will be necessary to replace a(n) by a list of its "digits". So the result will be a triangle: 1 / 1 / 1,0 / 2,1,3 / ..., in which row n is a list of the digits written in base n. This should be an additional sequence with a cross-reference to this one. - _N. J. A. Sloane_, Sep 21 2019

%C See A349918 for the corresponding triangle. - _Rémy Sigrist_, Dec 05 2021

%H Rémy Sigrist, <a href="/A309737/b309737.txt">Table of n, a(n) for n = 1..10</a>

%H Rémy Sigrist, <a href="/A309737/a309737.gp.txt">PARI program for A309737</a>

%F a(1) = 1; a(n) is the concatenation of all the previous terms, evaluated in base n-1, written in base n.

%e For a(3) the previous terms are {1,1}. Evaluating the concatenation of those terms in base n-1 = 2 gives 11_2 = 3; converting that to base n = 3 gives 10_3, so a(3) = 10.

%e n=4: 1110_3 = 39_10 = 213_4, so a(4) = 213.

%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 afull():

%o alst, diglst = [1], [1]

%o for n in range(2, 11):

%o andigs = digits(fromdigits(diglst, n-1), n)[1:]

%o alst.append(int("".join(map(str, andigs))))

%o diglst.extend(andigs)

%o return alst

%o print(afull()) # _Michael S. Branicky_, Dec 05 2021

%Y Cf. A349918.

%K nonn,base,full,fini

%O 1,3

%A _Moshe Levy_, Aug 14 2019

%E More terms from _Rémy Sigrist_, Dec 05 2021