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!)
A248082 Least number k such that k^n - k +/- 1 are twin primes, or 0 if no such k exists. 0
3, 2, 6, 2, 4, 30, 0, 27, 4, 9, 109, 14, 0, 70, 58, 208, 12, 65, 0, 172, 1579, 1639, 585, 208, 0, 494, 505, 79, 3630, 95, 0, 81, 4422, 130, 1648, 3, 0, 13030, 174, 3, 627, 9524, 0, 3858, 1369, 1235, 11340, 6411, 0, 35494, 2553, 4883, 412, 44366, 0, 14640, 101386, 44021, 3003, 13045 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
For n > 2, if n == 2 (mod 6), then k^n - k + 1 is divisible by k^2 - k + 1. Thus it will never be prime.
LINKS
PROG
(PARI)
a(n)=if(n>2&&n==Mod(2, 6), return(0)); k=1; while(!ispseudoprime(k^n-k+1)||!ispseudoprime(k^n-k-1), k++); k
n=2; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
Sequence in context: A143310 A131897 A061187 * A021758 A040008 A129354
KEYWORD
nonn
AUTHOR
Derek Orr, Sep 30 2014
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 September 7 02:35 EDT 2024. Contains 375728 sequences. (Running on oeis4.)