OFFSET
1,2
COMMENTS
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..20001
EXAMPLE
a(1) = 1 as 1 digit is used so far [1] and a(1) is a multiple of 1;
a(2) = 2 as 2 digits are used so far [1 and 2] and a(2) is a multiple of 2;
a(3) = 3 as 3 digits are used so far [1, 2 and 3] and a(3) is a multiple of 3;
...
a(10) is not equal to 10 as 11 digits would be used so far and 10 is not a multiple of 11;
a(10) = 11 as 11 digits are used so far [1, 2, 3, 4, 5, 6, 7, 8, 9, 1 and 1] and a(10) is a multiple of 11;
...
a(56) = 26 as 104 digits are used so far [including a(56)] and 104 is a multiple of 26 (indeed 26*4 = 104);
PROG
(PARI) u=1; s=0; w=0; for (n=1, 84, for (v=u, oo, if (!bittest(s, v) && (w+(x=#digits(v)))%v==0, print1 (v ", "); s+=2^v; while (bittest(s, u), u++)
; w+=x; break))) \\ Rémy Sigrist, Dec 04 2018
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Dec 04 2018
STATUS
approved