OFFSET
1,1
COMMENTS
If prime(n) has k digits then a(n) == prime(n) (mod 10^k); a(8r+5) = 0 for r > 1.
EXAMPLE
a(5) = 711, ending in 11 = prime(n) and 711 == 0 (mod 9, the fifth odd number).
PROG
(PARI) a(n) = {if (((n >=8) && ((n-8) % 5 == 0)), return (0)); k = 1; tn = 2*n-1; p = prime(n); tp = 10^length(Str(p)); while ((k*tn) % tp != p, k++); return (k*tn); } \\ Michel Marcus, Sep 15 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 17 2005
EXTENSIONS
More terms from Joshua Zucker, May 05 2006
STATUS
approved