A080693 Numbers of the form p^2*q + r*s where p,q,r,s are (not necessarily distinct) primes.
12, 14, 16, 17, 18, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86
Offset: 1
Keywords
Examples
12=2^2*2 + 2*2
Crossrefs
Cf. A081053.
Programs
-
Maple
H := proc(n::posint) local p,q,r,s; p := 2; while p<=floor(sqrt((n-4)/2)) do q := 2; while q<=floor((n-4)/p^2) do s := 2; while s<=floor((n-p^2*q)/2) do r := (n-p^2*q)/s; if type(r,posint) then if isprime(r) then return(true,p,q,s,r); end if; end if; s := nextprime(s); end do; q := nextprime(q); end do; p := nextprime(p); end do; return(false); end:
-
Mathematica
Take[ Union[ Flatten[ Table[ Prime[p]^2*Prime[q] + Prime[r]*Prime[s], {p, 1, 6}, {q, 1, 15}, {r, 1, 15}, {s, 1, 15}]]], 70]
Extensions
Edited and extended by Robert G. Wilson v, Mar 05 2003
Comments