OFFSET
1,2
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
MATHEMATICA
spi[{ctn_, n_, a_}]:=Module[{k=1}, While[Mod[ctn*10^IntegerLength[k]+k, n+1] != 0, k++]; {ctn*10^IntegerLength[k]+k, n+1, k}]; NestList[spi, {1, 1, 1}, 80][[All, 3]] (* Harvey P. Dale, Nov 30 2022 *)
PROG
(PARI) num = 1; print(1); for (n = 2, 9, c = 10*num%n; d = n - c; print(d); num = 10*num + d); for (n = 10, 90, c = 10*num%n; d = n - c; if (d < 10, print(d); num = 10*num + d, c = 100*num%n; d = n - c; if (d < 10, d = d + n); print(d); num = 100*num + d));
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
David Wasserman, Oct 21 2004
STATUS
approved