cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A072064 #14 Nov 27 2023 14:48:01
%S A072064 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 A072064 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 A072064 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 A072064 Least k>0 such that prime(n)+k*n is prime.
%H A072064 Seiichi Manyama, <a href="/A072064/b072064.txt">Table of n, a(n) for n = 1..10000</a>
%e A072064 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 A072064[n_]:=Module[{p=Prime[n],k=1},While[!PrimeQ[p+k*n],k++];k];Array[A072064,100] (* _Paolo Xausa_, Nov 27 2023 *)
%o A072064 (PARI) a(n) = my(p=prime(n), k=1); while (!isprime(p+k*n), k++); k; \\ _Michel Marcus_, Nov 27 2023
%Y A072064 Cf. A034693, A000040, A072063.
%K A072064 nonn
%O A072064 1,3
%A A072064 _Reinhard Zumkeller_, Jun 12 2002