A346706 Lesser members of twin primes which are the sum of the first k primes for some number k.
5, 17, 41, 197, 281, 38921, 121631, 325019, 642869, 681257, 1005551, 1086557, 2327399, 4975457, 7584569, 7819787, 8130767, 8522159, 14848187, 17769377, 18615677, 19949537, 20144051, 21171191, 24845207, 33669047, 35166449, 56039957, 73479947, 82366769, 92731367
Offset: 1
Keywords
Examples
5 = 2+3; 5 is a twin prime with 7. 17 = 2+3+5+7; 17 is a twin prime with 19. 41 = 2+3+5+7+11+13; 41 is a twin prime with 43. 197 = 2+3+5+7+11+13+17+19+23+29+31+37; 197 is a twin prime with 199.
Links
- Sebastian Sargenti, Table of n, a(n) for n = 1..128
Programs
-
Mathematica
Select[Accumulate @ Select[Range[45000], PrimeQ], PrimeQ[#] && PrimeQ[# + 2] &] (* Amiram Eldar, Aug 01 2021 *)
-
PARI
lista(nn) = {my(s=0); for (n=1, nn, s += prime(n); if (isprime(s) && isprime(s+2), print1(s, ", ")););} \\ Michel Marcus, Aug 21 2021
-
Python
from itertools import accumulate from sympy import isprime, primerange list(filter(lambda p: isprime(p) and isprime(p+2), accumulate(primerange(2, 10000)))) # David Radcliffe, Aug 01 2021
Extensions
a(13)-a(31) from Jon E. Schoenfield, Jul 29 2021