The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A045636 Numbers of the form p^2 + q^2, with p and q primes. 26
 8, 13, 18, 29, 34, 50, 53, 58, 74, 98, 125, 130, 146, 170, 173, 178, 194, 218, 242, 290, 293, 298, 314, 338, 365, 370, 386, 410, 458, 482, 530, 533, 538, 554, 578, 650, 698, 722, 818, 845, 850, 866, 890, 962, 965, 970, 986, 1010, 1058, 1082, 1130, 1202, 1250 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A045698(a(n)) > 0. - Reinhard Zumkeller, Jul 29 2012 All terms greater than 8 are of the form 8k+2 or 8k+5 (A047617). - Giuseppe Melfi, Oct 06 2022 LINKS T. D. Noe, Table of n, a(n) for n = 1..10000 Index entries for sequences related to sums of squares EXAMPLE 18 belongs to the sequence because it can be written as 3^2 + 3^2. MATHEMATICA q=13; imax=Prime[q]^2; Select[Union[Flatten[Table[Prime[x]^2+Prime[y]^2, {x, q}, {y, x}]]], #<=imax&] (* Vladimir Joseph Stephan Orlovsky, Apr 20 2011 *) With[{nn=60}, Take[Union[Total/@(Tuples[Prime[Range[nn]], 2]^2)], nn]] (* Harvey P. Dale, Jan 04 2014 *) PROG (PARI) list(lim)=my(p1=vector(primepi(sqrt(lim-4)), i, prime(i)^2), t, p2=List()); for(i=1, #p1, for(j=i, #p1, t=p1[i]+p1[j]; if(t>lim, break, listput(p2, t)))); vecsort(Vec(p2), , 8) \\ Charles R Greathouse IV, Jun 21 2012 (Haskell) import Data.List (findIndices) a045636 n = a045636_list !! (n-1) a045636_list = findIndices (> 0) a045698_list -- Reinhard Zumkeller, Jul 29 2012 (Python) from sympy import primerange def aupto(limit): primes = list(primerange(2, int((limit-4)**.5)+2)) nums = [p*p + q*q for i, p in enumerate(primes) for q in primes[i:]] return sorted(set(k for k in nums if k <= limit)) print(aupto(1251)) # Michael S. Branicky, Aug 13 2021 CROSSREFS A214723 is a subsequence. Complement: A214879. Cf. A214511 (least number having n orderless representations as p^2 + q^2). Cf. A047617. Sequence in context: A224251 A006619 A023487 * A214723 A022954 A364411 Adjacent sequences: A045633 A045634 A045635 * A045637 A045638 A045639 KEYWORD nonn,nice AUTHOR Felice Russo STATUS approved

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

Last modified September 24 14:54 EDT 2023. Contains 365579 sequences. (Running on oeis4.)