editing
approved
editing
approved
with(numtheory):
T:=proc(t) local 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, n; b:=1; print(1); for n from 2 to q do b:=n+b*10^T(n);
a:=sort([op(divisors(b))]); print(a[2]); od; end: P(100); # Paolo P. Lava, Apr 30 2014
# Alternative:
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
editing
approved
a(1) = 1; for n > 1, a(n) = the smallest prime divisor of the number C(n) formed from the concatenation of 1,2,3,... up to n.
Robert Israel and Robert G. Wilson v, <a href="/A075019/b075019.txt">Table of n, a(n) for n = 1..1000</a> (first 120 terms from Robert Israel)
approved
editing
proposed
approved
editing
proposed