login
A178220
Smallest number that appending to n-th prime gives another prime.
0
3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 9, 1, 9, 23, 3, 3, 3, 9, 3, 7, 9, 23, 1, 3, 1, 11, 1, 11, 7, 9, 3, 9, 3, 1, 1, 7, 29, 3, 11, 1, 3, 1, 3, 3, 1, 7, 3, 3, 3, 3, 1, 11, 9, 3, 3, 1, 7, 9, 3, 9, 9, 9, 7, 21, 3, 1, 21, 1, 3, 3, 1, 3, 3, 3, 17, 19, 3, 1, 11, 1, 17, 7, 1, 51, 3, 37, 33, 7
OFFSET
1,1
FORMULA
a(n) = A030670(n) after deleting n-th prime.
EXAMPLE
n=1: prime(1)=2, A030670(1)=23, after deleting 2 we get a(1)=3
n=2: prime(2)=3, A030670(2)=31, after deleting 3 we get a(2)=1
MATHEMATICA
f[n_] := (k = 1; tsn = ToString[n]; While[a = ToExpression[tsn <> ToString[k]]; !PrimeQ[a], k++]; k);
Table[f[Prime[n]], {n, 1, 200}]
CROSSREFS
Cf. A030670.
Sequence in context: A266875 A307193 A111742 * A334464 A316780 A338730
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Dec 20 2010
STATUS
approved