A175452 a(n) = smallest prime such that a(n)+2 is multiple of 2n+1.
7, 3, 5, 7, 31, 11, 13, 83, 17, 19, 67, 23, 79, 317, 29, 31, 103, 109, 37, 367, 41, 43, 139, 47, 151, 157, 53, 283, 293, 59, 61, 193, 199, 67, 211, 71, 73, 229, 709, 79, 911, 83, 433, 443, 89, 277, 283, 677, 97, 503, 101, 103, 2459, 107, 109, 337, 113, 349, 593, 1087
Offset: 1
Keywords
Examples
n=1: 7+2 is multiple of 3, n=2: 3+2 is multiple of 5, n=5: 31+2 is multiple of 11, n=8: 83+2 is multiple of 17.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A124199.
Programs
-
Mathematica
s={};Do[k=2;While[Mod[2+(p=Prime[k]),n]>0,k++ ];AppendTo[s,p],{n,3,2001,2}];s
-
PARI
a(n) = my(p=2); while ((p+2) % (2*n+1), p = nextprime(p+1)); p; \\ Michel Marcus, Jul 03 2021
-
Python
from sympy import nextprime def a(n): p, m = 2, 2*n+1 while (p+2)%m: p = nextprime(p) return p print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Jul 03 2021
Comments