The sequence discussed in this challenge is a variant of the Descending Dungeons sequence family. Specifically, the sequence generation rules:
(A_b = A's base 10 representation read as a base b number, A = A_10)
A(0) = 10
A(n) = 10_(11_(12_(...(n+9)_(n+10))))
Your goal is to make a program which accepts a nonnegative integer n
and returns A(n) of the descending dungeons sequence, using 0-indexing.
Base conversion built-ins are allowed.
Return the result itself in base 10.
Test cases: (A = B
means input A returns B
)
0 = 10
1 = 11
2 = 13
3 = 16
4 = 20
5 = 25
6 = 31
7 = 38
8 = 46
9 = 55
10 = 65
11 = 87
12 = 135
13 = 239
14 = 463
15 = 943
16 = 1967
17 = 4143
18 = 8751
19 = 18479
20 = 38959
Use OEIS A121263 for further test cases.
This is code golf, so the shortest program wins. Have fun.
Final sidenote: This sequence came to my attention through a recent Numberphile video discussing descending dungeon sequences.