Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Nov 01 2017 16:19:53
%S 6,7,9,11,12,14,15,16,17,20,21,22,23,26,27,28,30,32,33,35,36,38,40,41,
%T 42,44,45,46,47,48,50,51,52,54,56,57,60,62,63,65,66,68,70,71,72,75,76,
%U 77,78,80,82,83,84,86,87,88,90,92,93,96,98,101,102,104,105,106,107,108
%N Sum of a prime and the square of a prime.
%C Suggested by a Goldbach-type conjecture.
%H Charles R Greathouse IV, <a href="/A081053/b081053.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = p^2 + q, p and q primes.
%e 7=2^2+3
%p G := proc(n::posint) local p,q; p := 2; while p<=n-2 do q := n-p^2; if type(q,posint) then if isprime(q) then return(true,p,q); end if; end if; p := nextprime(p); end do; return(false); end:
%t Take[ Union[ Flatten[ Table[ Prime[i] + Prime[j]^2, {i, 1, 30}, {j, 1, 5}]]], 70]
%o (PARI) is(n)=if(n%2, isprime(n-4) || isprimepower(n-2)==2, forprime(q=3, sqrtint(n), if(isprime(n-q^2), return(1))); n==6) \\ _Charles R Greathouse IV_, Nov 01 2017
%K nonn
%O 1,1
%A Pilar Guerra Cardenas (pilarguerracardenas(AT)hotmail.com), Mar 03 2003
%E More terms from _Robert G. Wilson v_, Mar 05 2003