login
A330489
a(n) is equal to a(n-1) plus (a(n-1) written in base n but interpreted in base n+1), with a(1)=1.
0
1, 2, 4, 9, 19, 41, 87, 193, 427, 940, 2049, 4619, 10363, 22921, 50522, 111018, 248438, 554112, 1232067, 2723158, 6003186, 13446356, 30050952, 66594552, 147234100, 324832999, 714046741, 1585188074, 3511557725, 7762753394, 17129248715, 37693951852, 82773271861
OFFSET
1,2
EXAMPLE
Given the 5th term in the sequence, the next (6th) term is the 5th term plus the result obtained by taking the 5th term's digits in order in base 6 (the index of the next term) and incrementing the base by 1 without changing the digits.
In this example, a(5) = 19 = 31_6; incrementing the base of 31_6 without changing the digits gives 31_7 = 22, and a(6) = a(5) + 22 = 19 + 22 = 41.
.
digits
of a(n-1)
a(n-1) interpreted
in in base n+1
n a(n-1) base n = k k + a(n-1) = a(n)
- ------ ------ ----------- -------------------
1 1
2 1 1_2 1_3 = 1 1 + 1 = 2
3 2 2_3 2_4 = 2 2 + 2 = 4
4 4 10_4 10_5 = 5 5 + 4 = 9
5 9 14_5 14_6 = 10 10 + 9 = 19
6 19 31_6 31_7 = 22 22 + 19 = 41
7 41 56_7 56_8 = 46 46 + 41 = 87
8 87 127_8 127_9 = 106 106 + 87 = 193
MATHEMATICA
a[n_] := a[n] = a[n-1] + FromDigits[ IntegerDigits[ a[n-1], n], n + 1]; Array[a, 33] (* Giovanni Resta, Dec 16 2019 *)
PROG
(PARI) lista(nn) = {my(a = 1); print1(a, ", "); for (n=2, nn, a += fromdigits(digits(fromdigits(digits(a, n), n+1))); print1(a, ", "); ); } \\ Michel Marcus, Dec 16 2019
CROSSREFS
Sequence in context: A136298 A122584 A184936 * A299106 A141015 A141683
KEYWORD
nonn,base,easy
AUTHOR
Tristan Young, Dec 15 2019
STATUS
approved