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!)
A072064 Least k>0 such that prime(n)+k*n is prime. 2
1, 1, 2, 1, 4, 1, 2, 3, 2, 3, 2, 2, 2, 2, 4, 3, 4, 1, 6, 3, 4, 1, 10, 1, 4, 1, 2, 2, 2, 2, 4, 1, 4, 1, 6, 2, 6, 2, 6, 3, 24, 1, 2, 2, 6, 3, 8, 1, 6, 3, 8, 5, 2, 2, 2, 3, 2, 4, 6, 2, 16, 3, 2, 2, 2, 1, 4, 3, 6, 1, 10, 1, 4, 2, 6, 6, 16, 3, 8, 2, 4, 1, 6, 2, 10, 3, 4, 4, 18, 2, 6, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
n=3, prime(3)=5: 5+1*3=8 is not prime, but 5+2*3=11, therefore a(3)=2 and A072063(3)=11.
MATHEMATICA
A072064[n_]:=Module[{p=Prime[n], k=1}, While[!PrimeQ[p+k*n], k++]; k]; Array[A072064, 100] (* Paolo Xausa, Nov 27 2023 *)
PROG
(PARI) a(n) = my(p=prime(n), k=1); while (!isprime(p+k*n), k++); k; \\ Michel Marcus, Nov 27 2023
CROSSREFS
Sequence in context: A349128 A366450 A105584 * A105498 A179289 A083414
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 12 2002
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 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)