OFFSET
1,4
COMMENTS
Prime(n) is all zeros followed by prime(n). This is all threes followed by prime(n). Conjecture: No term is zero for n > 3.
a(378) has 23776 digits. - Harvey P. Dale, Aug 20 2020
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..377
EXAMPLE
a(8) = 3319, as 319 is composite prime(8) = 19.
MATHEMATICA
sp3[p_]:=Module[{k=1}, While[!PrimeQ[FromDigits[Join[PadRight[ {}, k, 3], IntegerDigits[ p]]]], k++]; FromDigits[ Join[PadRight[ {}, k, 3], IntegerDigits[ p]]]]; Join[{0, 0, 0}, Table[sp3[p], {p, Prime[Range[4, 40]]}]] (* Harvey P. Dale, Aug 19 2020 *)
PROG
(PARI) a(n) = {if (n <= 3, return (0)); k = 1; p = prime(n); kp = 10^length(Str(p)); pref = (10^k-1)/3; while (! isprime(res = kp*pref + p), k++; pref = (10^k-1)/3; ); res; } \\ Michel Marcus, Sep 15 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 17 2005
EXTENSIONS
More terms from Joshua Zucker, May 06 2006
STATUS
approved