login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103558 Semiprimes of the form p^2 + q^2, where p and q are primes. 2
34, 58, 74, 146, 178, 194, 218, 298, 314, 365, 386, 458, 482, 533, 538, 554, 698, 818, 866, 965, 1082, 1202, 1322, 1418, 1538, 1658, 1685, 1706, 1853, 1858, 1874, 2018, 2042, 2138, 2218, 2234, 2258, 2498, 2642, 2813, 2818, 2858, 2978, 3098, 3218, 3338 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

p and q must be distinct, otherwise p^2 + q^2 = 2*p*p has three prime factors. - Klaus Brockhaus

Even terms are 2*A103739. - Robert Israel, Nov 03 2017

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

34 is a term because 3^2 + 5^2 = 34 = 2*17; 58 is a term because 3^2 + 7^2 = 58 = 2*29; 74 is a term because 5^2 + 7^2 = 74 = 2*37.

MAPLE

N:= 10000: # to get all terms <= N

P:= select(isprime, [$1..floor(sqrt(N))]):

Res:= NULL:

for i from 1 to nops(P) do

  for j from 1 to i-1 do

    r:= P[i]^2 + P[j]^2;

    if r > N then break fi;

    if numtheory:-bigomega(r) = 2 then Res:= Res, r fi;

od od:

sort(convert({Res}, list)); # Robert Israel, Nov 03 2017

MATHEMATICA

fQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; Select[ Sort[ Flatten[ Table[ Prime[p]^2 + Prime[q]^2, {p, 16}, {q, p - 1}]]], fQ[ # ] &] (* Robert G. Wilson v, Mar 23 2005 *)

PROG

(PARI) {m=53; v=[]; forprime(p=2, m, forprime(q=nextprime(p+1), m, if(bigomega(k=p^2+q^2)==2, v=concat(v, k)))); v=vecsort(v); stop=nextprime(m+1)^2; for(j=1, length(v), if(v[j]<stop, print1(v[j], ", ")))} \\ Klaus Brockhaus

CROSSREFS

Cf. A001358, A006881, A103739.

Sequence in context: A294173 A176687 A224896 * A103686 A211715 A108610

Adjacent sequences:  A103555 A103556 A103557 * A103559 A103560 A103561

KEYWORD

easy,nonn

AUTHOR

Giovanni Teofilatto, Mar 23 2005

EXTENSIONS

More terms from Klaus Brockhaus and Robert G. Wilson v, Mar 23 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 16 09:34 EST 2018. Contains 318160 sequences. (Running on oeis4.)