Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A357280
Smallest m such that m^k-2 and m^k+2 are prime for k=1..n.
0
5, 9, 102795, 559838181, 27336417022509
OFFSET
1,1
EXAMPLE
a(3) = 102795 because:
for k = 1; 102795^1-2 = 102793 and 102795^1+2 = 102797, both of which are prime, and
for k = 2; 102795^2-2 = 10566812023 and 102795^2+2 = 10566812027, both of which are prime, and
for k = 3; 102795^3-2 = 1086215442109873 and 102795^3+2 = 1086215442109877, both of which are prime, and
102795 is the smallest number with this property.
PROG
(PARI) isok(m, n) = for (k=1, n, if(!isprime(m^k-2) || !isprime(m^k+2), return(0)); ); return(1);
a(n) = my(m=1); while(!isok(m, n), m++); m; \\ Michel Marcus, Nov 14 2022
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Kellen Shenton, Sep 24 2022
STATUS
approved