The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357280 Smallest m such that m^k-2 and m^k+2 are prime for k=1..n. 0
5, 9, 102795, 559838181, 27336417022509 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A348132 A098135 A112259 * A370131 A258150 A330599
KEYWORD
nonn,more,hard
AUTHOR
Kellen Shenton, Sep 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 12:12 EDT 2024. Contains 372858 sequences. (Running on oeis4.)