cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A382509 #21 Apr 21 2025 13:23:55
%S A382509 3,6,13,17,28,38,43,67,80,88,96,118,127,137,167,178,188,193,218,223,
%T A382509 272,283,298,302,328,368,472,487,508,563,592,613,617,634,643,647,662,
%U A382509 718,773,778,802,808,872,878,932,1033,1142,1168,1172,1187,1193,1198,1256,1277
%N 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.
%H A382509 Karl-Heinz Hofmann, <a href="/A382509/b382509.txt">Table of n, a(n) for n = 1..10000</a>
%e A382509 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.
%t A382509 Select[Plus @@@ Partition[Prime[Range[400]], 2, 1]/4, IntegerQ[#] && PrimeQ[#/2^IntegerExponent[#, 2]] &] (* _Amiram Eldar_, Apr 21 2025 *)
%o A382509 (Python)
%o A382509 from sympy import isprime, sieve as prime
%o A382509 A382509 = []
%o A382509 for x in range(2,1000):
%o A382509     if (totest := (prime[x] + prime[x+1])) % 4 == 0:
%o A382509         s = totest // 4
%o A382509         while totest % 2 == 0: totest //= 2
%o A382509         if isprime(totest): A382509.append(s)
%o A382509 print(A382509)
%o A382509 (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
%Y A382509 Cf. A001043, A118134.
%K A382509 nonn,easy
%O A382509 1,1
%A A382509 _Karl-Heinz Hofmann_ and _Hugo Pfoertner_, Apr 18 2025