OFFSET
1,3
LINKS
Dominic McCarty, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=2, a(2)=0 because 0 is not yet in the sequence and a(1) || a(2) = 10 is divisible by 2.
For n=3, a(3)!=0 since 0 is already in the sequence, but instead a(3)=3 since concatenation a(2) || a(3) = 03 is divisible by 3.
MAPLE
P:=proc(q) local a, b, k, n; a:=[1, 0, 3]; for n from 4 to q do
for k from 2 do if numboccur(k, a)=0 then b:=a[nops(a)]*10^length(k)+k;
if frac(b/n)=0 then a:=[op(a), k]; break; fi; fi; od; od; print(op(a)); end:
P(64);
PROG
(JavaScript) let a=[1]; console.log("1 1"); let i=0; while(a.length<10000){if(a.includes(i)||(Number(""+a[a.length-1]+i)%(a.length+1)!= 0)){i++; }else{a.push(i); console.log(""+a.length+" "+i); i=0; }} // Dominic McCarty, Sep 03 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Aug 18 2024
STATUS
approved