login
A381330
Numbers that are the sum of a prime and the square of a prime in more than one way.
2
11, 27, 28, 32, 38, 51, 52, 54, 56, 62, 66, 68, 72, 78, 80, 86, 92, 96, 98, 108, 110, 116, 122, 126, 128, 132, 134, 138, 140, 146, 150, 152, 156, 158, 162, 164, 171, 172, 174, 176, 180, 182, 186, 188, 192, 198, 200, 204, 206, 210, 212, 216, 218, 222, 224, 228
OFFSET
1,1
COMMENTS
Subsequence of A081053. Most terms are even. The odd terms are 11, 27, 51, 171, 363, 843, 1371, 1851 and must be of the form 2+p^2=4+q for primes p, q. In particular, the odd terms are exactly A049002(n)+4 for n>1.
EXAMPLE
11 is a term since 11 = 2^2+7 = 3^2+2.
27 is a term since 27 = 2^2+23 = 5^2+2.
28 is a term since 28 = 3^2+19 = 5^2+3.
32 is a term since 32 = 3^2+23 = 5^2+7.
PROG
(Python)
from math import isqrt
from itertools import count, islice
from sympy import isprime, primerange
def A381330_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
c = 0
for p in primerange(isqrt(n)+1):
if isprime(n-p**2):
c += 1
if c>1:
yield n
break
A381330_list = list(islice(A381330_gen(), 30))
(PARI) isok(k) = my(nb=0); forprime(p=2, sqrtint(k), if (isprime(k-p^2), nb++); ); nb > 1; \\ Michel Marcus, Feb 21 2025
CROSSREFS
Sequence in context: A014468 A156373 A368930 * A029492 A185451 A165608
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Feb 20 2025
STATUS
approved