A329590 Odd numbers k that cannot be expressed as k = p+q+r, with p prime and (q, r) a pair of twin primes.
1, 3, 5, 7, 9, 33, 57, 93, 99, 129, 141, 153, 177, 183, 195, 213, 225, 243, 255, 261, 267, 273, 297, 309, 327, 333, 351, 369, 393, 411, 423, 435, 453, 477, 489, 501, 513, 519, 525, 537, 561, 573, 591, 597, 603, 633, 645, 657, 663, 675, 687, 693, 705, 711, 723
Offset: 1
Keywords
Examples
33 can be expressed as the sum of three primes in 9 different ways: 33 = 11 + 11 + 11 = 13 + 13 + 7 = 17 + 11 + 5 = 17 + 13 + 3 = 19 + 7 + 7 = 19 + 11 + 3 = 23 + 5 + 5 = 23 + 7 + 3 = 29 + 2 + 2; there is no pair of twin primes in the addends, so 33 is a term.
Programs
-
PARI
for(n = 0, 500, m = 2*n+1; v = 0; forprime(i = 3, m-8, j = (m-i)/2; if(isprime(j-1) && isprime(j+1), v = 1)); if(v == 0, print1(m,", ")))
-
PARI
isok(k) = {if (! (k % 2), return (0)); forprime(p=3, k, if (isprime((k-p)\2-1) && isprime((k-p)\2+1), return(0));); return (1);} \\ Michel Marcus, Feb 16 2020