OFFSET
1,3
LINKS
Kellen Shenton, Table of n, a(n) for n = 1..10000
FORMULA
a[n_] := (For[m=1, !(PrimeQ[m+n]&&PrimeQ[m^2+n^2]&&PrimeQ[m^4+n^4]&& PrimeQ[m^8+n^8]&&PrimeQ[m^16+n^16]), m++ ];m)
EXAMPLE
a(2)=1 because 2^2^k + 1 is prime for k= 0,1,2,3 and 4.
MATHEMATICA
a[n_] := (For[m=1, !(PrimeQ[m+n]&&PrimeQ[m^2+n^2]&&PrimeQ[m^4+n^4]&& PrimeQ[m^8+n^8]&&PrimeQ[m^16+n^16]), m++ ]; m); Do[Print[a[n]], {n, 50}]
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Farideh Firoozbakht, Feb 06 2004
STATUS
approved