A382509 Integers s = (p1+p2)/4 such that p1 and p2 are consecutive primes and s can be written in the form p*2^k with k>=0 and p>2 prime.
3, 6, 13, 17, 28, 38, 43, 67, 80, 88, 96, 118, 127, 137, 167, 178, 188, 193, 218, 223, 272, 283, 298, 302, 328, 368, 472, 487, 508, 563, 592, 613, 617, 634, 643, 647, 662, 718, 773, 778, 802, 808, 872, 878, 932, 1033, 1142, 1168, 1172, 1187, 1193, 1198, 1256, 1277
Offset: 1
Examples
For n = 2: a(n) = 6 because 4 * 6 = 24 and 24 is the sum of the two consecutive primes 11 and 13 and the factorization of 6 is 3 * 2^1.
Links
- Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Plus @@@ Partition[Prime[Range[400]], 2, 1]/4, IntegerQ[#] && PrimeQ[#/2^IntegerExponent[#, 2]] &] (* Amiram Eldar, Apr 21 2025 *)
-
PARI
is(n) = my(v=valuation(n, 2), n2);if(!isprime(n>>v), return(0)); n2 = 2*n; n2 - precprime(n2) == nextprime(n2) - n2 \\ David A. Corneth, Apr 21 2025
-
Python
from sympy import isprime, sieve as prime A382509 = [] for x in range(2,1000): if (totest := (prime[x] + prime[x+1])) % 4 == 0: s = totest // 4 while totest % 2 == 0: totest //= 2 if isprime(totest): A382509.append(s) print(A382509)