A261625 Number of primes p <= n such that (p-1)*n+1 is prime.
0, 1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 2, 4, 1, 4, 3, 1, 5, 2, 2, 5, 4, 3, 3, 4, 3, 5, 6, 3, 5, 3, 2, 6, 5, 5, 5, 3, 2, 5, 6, 3, 4, 6, 2, 7, 9, 2, 5, 5, 3, 9, 7, 1, 5, 7, 5, 5, 8, 2, 8, 7, 3, 8, 7, 5, 7, 6, 3, 6, 9, 5, 9, 7, 4, 6, 8, 3, 8, 9, 3
Offset: 1
Keywords
Examples
a(53) = 1 since 3 and (3-1)*53+1 = 107 are both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588 [math.NT], 2012-2015.
Programs
-
Mathematica
Do[r=0;Do[If[PrimeQ[(Prime[k]-1)n+1],r=r+1],{k,1,PrimePi[n]}];Print[n," ",r];Continue,{n,1,80}]
-
PARI
a(n) = my(nb=0); forprime(p=2, n, if (isprime((p-1)*n+1), nb++)); nb; \\ Michel Marcus, Aug 27 2015
Comments