OFFSET
0,6
COMMENTS
For any starting value of a(0), a(1)=0 and a(2)=1.
First terms with 1, 2, 3, 4 and 5 digits are a(0)=0, a(11)=10, a(98)=157, a(940)=1739 and a(9044)=18963.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..1000
EXAMPLE
a(0) = 0 by definition;
a(1) = 0 because 0 mod 1 = 0;
a(2) = 1 because 1 mod 2 = 1;
a(3) = 1 because 11 mod 3 = 2;
a(4) = 1 because 111 mod 4 = 3;
a(5) = 4 because 1114 mod 5 = 4; etc.
MAPLE
P:=proc(q) local a, b, c, k, n; c:=[]; a:=0;
for k from 1 to 71 do for n from 0 to q do
b:=a*10^length(convert(n, string))+n:
if (b mod k)=k-1 then a:=b; c:=[op(c), n]; break;
fi; od; od; 0, op(c); end: P(10^5);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jun 07 2019
STATUS
approved