OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..2035

EXAMPLE

For n=3 p=5 is the least prime that 6^3-p is prime (211).

MAPLE

f:= proc(n) local t, p;

t:= 6^n;

p:= 2;

do

p:= nextprime(p);

until isprime(t-p);

p

end proc:

map(f, [$1..100]); # Robert Israel, Nov 05 2020

MATHEMATICA

f[n_] := Block[{p = 2}, While[! PrimeQ[6^n - p], p = NextPrime[p]];

p]; Array[f, 60]

PROG

(PARI) a(n) = my(p = 2); while(!isprime(6^n-p), p = nextprime(p+1)); p; \\ Michel Marcus, Mar 23 2016

CROSSREFS

KEYWORD

nonn

AUTHOR

Mateusz Szymański, Apr 21 2012

STATUS

approved