A381330 Numbers that are the sum of a prime and the square of a prime in more than one way.
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
Keywords
Examples
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.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
PARI
isok(k) = my(nb=0); forprime(p=2, sqrtint(k), if (isprime(k-p^2), nb++);); nb > 1; \\ Michel Marcus, Feb 21 2025
-
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))
Comments