A118882 Numbers which are the sum of two squares in two or more different ways.
25, 50, 65, 85, 100, 125, 130, 145, 169, 170, 185, 200, 205, 221, 225, 250, 260, 265, 289, 290, 305, 325, 338, 340, 365, 370, 377, 400, 410, 425, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 650, 676, 680
Offset: 1
Keywords
Examples
50 = 7^2 + 1^2 = 5^2 + 5^2, so 50 is in the sequence.
Links
Programs
-
Haskell
import Data.List (findIndices) a118882 n = a118882_list !! (n-1) a118882_list = findIndices (> 1) a000161_list -- Reinhard Zumkeller, Aug 16 2011
-
Mathematica
Select[Range[1000], Length[PowersRepresentations[#, 2, 2]] > 1&] (* Jean-François Alcover, Mar 02 2019 *)
-
Python
from itertools import count, islice from math import prod from sympy import factorint def A118882_gen(startvalue=1): # generator of terms >= startvalue for n in count(max(startvalue,1)): f = factorint(n) if 1
>1): yield n A118882_list = list(islice(A118882_gen(),30)) # Chai Wah Wu, Sep 09 2022
Formula
A000161(a(n)) > 1. [Reinhard Zumkeller, Aug 16 2011]
Comments