A160751 a(n) is the smallest n-digit prime formed by appending a digit to a(n-1); a(1)=6.
6, 61, 613, 6131
Offset: 1
Programs
-
Maple
A160751 := proc(n) option remember ; local d; if n =1 then 6; else for d from 1 to 9 by 2 do if isprime(10*procname(n-1)+d) then RETURN( 10*procname(n-1)+d ) ; fi; od: RETURN(-1) ; fi; end: seq(A160751(n),n=1..10) ; # R. J. Mathar, May 26 2009
Extensions
Corrected by R. J. Mathar, May 26 2009
Comments