A370090 Numbers that can be expressed in exactly one way as the unordered sum of two distinct primes.
5, 7, 8, 9, 10, 12, 13, 14, 15, 19, 21, 25, 31, 33, 38, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265
Offset: 1
Keywords
Examples
5 = 2+3; 7 = 2+5; 8 = 3+5; 9 = 2+7; 10 = 3+7 (10 = 5+5 is not considered).
Links
Crossrefs
Programs
-
Maple
select(n -> A117929(n) = 1, [seq(1..265)]); # Peter Luschny, Feb 16 2024
-
Mathematica
tdpQ[{a_,b_}]:=AllTrue[{a,b},PrimeQ]&&a!=b; Select[Range[300],Count[IntegerPartitions[#,{2}],?tdpQ]==1&] (* _Harvey P. Dale, Dec 30 2024 *)
-
Python
from sympy import sieve from collections import Counter from itertools import combinations def aupton(max): sieve.extend(max) a = Counter(c[0]+c[1] for c in combinations(sieve._list, 2)) return [n for n in range(1, max+1) if a[n] == 1] print(aupton(265)) # Michael S. Branicky, Feb 16 2024
Comments