OFFSET
1,2
LINKS
Paolo P. Lava and Giovanni Resta, Table of n, a(n) for n = 1..5000 (first 100 terms from Paolo P. Lava)
FORMULA
Starting with a(1)=1, the minimum number a(2) such that a(2) U a(1) is a Niven number is 2. In fact 21 / 3 = 7.
Again the minimum a(3) such that a(3) U a(2) U a(1) is a Niven number is 6. In fact 621 / 9 = 69. Etc.
MAPLE
with(numtheory);
S:=proc(s) local w; w:=convert(s, base, 10); sum(w[j], j=1..nops(w)); end:
T:=proc(t) local w, x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:
P:=proc(q) local a, b, c, j, n; a:=1; j:=1; print(1);
for n from 1 to q do b:=T(a); c:=j*10^b+a;
if type(c/S(c), integer) then a:=j*10^b+a; print(j); fi;
j:=j+1; od; print(); end: P(10^6);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 21 2014
STATUS
approved