OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..4320
EXAMPLE
To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:
----------------
n a(n)
----------------
0 0
1 1
2 2
3 3
4 10
5 11
6 12
7 13
8 20
9 21
10 22
11 23
12 30
13 31
14 32
15 33
16 40
and:
3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).
MATHEMATICA
f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[FromDigits@ f@ n, {n, 72}] (* Michael De Vlieger, Aug 31 2016 *)
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 30 2016
STATUS
approved