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

%I #14 Nov 27 2023 14:48:01

%S 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,

%T 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,

%U 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

%N Least k>0 such that prime(n)+k*n is prime.

%H Seiichi Manyama, <a href="/A072064/b072064.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%t A072064[n_]:=Module[{p=Prime[n],k=1},While[!PrimeQ[p+k*n],k++];k];Array[A072064,100] (* _Paolo Xausa_, Nov 27 2023 *)

%o (PARI) a(n) = my(p=prime(n), k=1); while (!isprime(p+k*n), k++); k; \\ _Michel Marcus_, Nov 27 2023

%Y Cf. A034693, A000040, A072063.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Jun 12 2002

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 6 15:46 EDT 2024. Contains 372294 sequences. (Running on oeis4.)