|
|
A259744
|
|
Smallest prime p such that, for every positive integer k <= n, the concatenation of p, prime(k)^2 and reverse(p) is prime.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
a(3)=1097 because 109747901 (1097&2^2&7901) and 109797901 (1097&3^2&7901) and 1097257901 (1097&5^2&7901) are prime numbers, and 1097 is the smallest prime for which this is the case.
|
|
MATHEMATICA
|
f[n_, k_] := FromDigits[Join[
IntegerDigits[n], IntegerDigits[Prime[k]^2],
Reverse[IntegerDigits[n]]]]
a[n_] := Module[{p = 2, k = 1},
While[k <= n,
If[PrimeQ[f[p, k]], k++, p = NextPrime[p]; k = 1];
];
Return[p]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|