A082399 a(1) = 1; thereafter, a(n) is the smallest nonnegative number such that the number Sum_{i=1..n} a(i)*10^(n-i) is divisible by n.
1, 0, 2, 0, 0, 0, 5, 6, 4, 0, 5, 10, 2, 2, 5, 6, 16, 8, 14, 0, 7, 18, 19, 2, 5, 10, 6, 0, 25, 20, 2, 20, 17, 12, 20, 28, 13, 4, 13, 30, 16, 20, 36, 4, 35, 28, 28, 16, 29, 10, 39, 14, 12, 4, 50, 20, 14, 24, 7, 50, 14, 54, 55, 18, 10, 44, 62, 52, 63, 50, 7, 18, 6, 62, 55, 54, 54, 54, 35, 10
Offset: 1
Keywords
Examples
After we have the first 11 terms, 1,0,2,0,0,0,5,6,4,0,5, the next number x must be chosen so that 102000564050 + x is divisible by 12; this implies that x = 10.
Links
- Paul Tek, Table of n, a(n) for n = 1..10000
Programs
-
Maple
M:=80; a[1]:=1; N:=1; for n from 2 to M do N:=10*N; t2:=N mod n; if t2 = 0 then a[n]:=0; else a[n]:=n-t2; fi; N:=N+a[n]; od: [seq(a[n],n=1..M)];
Comments