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!)
A187561 Least number k >= 0 such that prime(n)*(prime(n)-k)-1 is prime. 1
0, 1, 1, 1, 1, 5, 1, 7, 7, 1, 1, 7, 11, 13, 1, 5, 7, 1, 1, 1, 7, 23, 5, 7, 1, 1, 5, 11, 7, 5, 1, 1, 13, 1, 1, 11, 7, 29, 13, 5, 11, 1, 13, 7, 1, 13, 13, 13, 7, 11, 25, 13, 1, 17, 5, 5, 1, 11, 11, 11, 17, 13, 1, 7, 17, 7, 1, 17, 5, 37, 25, 1, 11, 25, 1, 5, 43, 1, 37, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
Table[k = 0; While[! PrimeQ[Prime[n]*(Prime[n] - k) - 1], k++]; k, {n, 100}]
PROG
(PARI) a(n)=my(p=prime(n)); for(k=0, p, if(isprime(p*(p-k)-1), return(k))) \\ Charles R Greathouse IV, Jul 26 2011
CROSSREFS
Sequence in context: A035109 A301509 A101263 * A088515 A200638 A322104
KEYWORD
nonn
AUTHOR
Pierre CAMI, Mar 13 2011
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 April 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)