login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A308552
a(n) is the least integer such that concat(a(0), a(1), ..., a(n-1), a(n)) == n-1 (mod n), with a(0) = 0.
1
0, 0, 1, 1, 1, 4, 1, 1, 1, 7, 9, 10, 11, 6, 5, 4, 3, 16, 17, 24, 19, 23, 7, 5, 9, 9, 35, 4, 19, 15, 29, 12, 31, 2, 17, 24, 31, 23, 7, 42, 39, 10, 23, 42, 51, 24, 37, 38, 39, 14, 9, 34, 51, 15, 15, 59, 59, 5, 27, 37, 59, 27, 13, 56, 15, 44, 49, 0, 59, 43, 69, 23
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
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
Sequence in context: A363977 A073937 A074058 * A368333 A088440 A300253
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jun 07 2019
STATUS
approved