OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
ppn[n_]:=Module[{k=1, prn=Prime[n]}, While[!PrimeQ[Prime[k n]-k prn], k++]; k]; Array[ppn, 100] (* Harvey P. Dale, May 22 2012 *)
PROG
(PARI) for(n=1, 210, s=1; while(isprime(prime(s*n)-s*prime(n))==0, s++); print1(s, ", "))
(Python)
from sympy import isprime, prime
def a(n):
pn = prime(n); k = 1
while not isprime(prime(k*n) - k*pn): k += 1
return k
print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Jul 04 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 10 2002
STATUS
approved