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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004432 Numbers that are the sum of 3 distinct nonzero squares. 27
14, 21, 26, 29, 30, 35, 38, 41, 42, 45, 46, 49, 50, 53, 54, 56, 59, 61, 62, 65, 66, 69, 70, 74, 75, 77, 78, 81, 83, 84, 86, 89, 90, 91, 93, 94, 98, 101, 104, 105, 106, 107, 109, 110, 113, 114, 115, 116, 117, 118, 120, 121, 122, 125, 126, 129, 131, 133 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers that can be written as a(n) = x^2 + y^2 + z^2 with 0 < x < y < z.

This is a subsequence (equal to the range) of A024803. As a set, it is the union of A025339 and A024804, subsequences of numbers having exactly one, resp. more than one, such representations. - M. F. Hasler, Jan 25 2013

Conjecture: a number n is a sum of 3 squares, but not a sum of 3 distinct nonzero squares (i.e., is in A004432 but not A000408), if and only if it is of the form 4^j*s, where j >= 0 and s in {1, 2, 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 22, 25, 27, 33, 34, 37, 43, 51, 57, 58, 67, 73, 82, 85, 97, 99, 102, 123, 130, 163, 177, 187, 193, 267, 627, 697}. - Jeffrey Shallit, Jan 15 2017

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

Index entries for sequences related to sums of squares

FORMULA

A004432 = { x^2+y^2+z^2 ; 0 < x < y < z }.

n is in A004432 <=> A025442(n)>0. - M. F. Hasler, Feb 03 2013

EXAMPLE

14=1^2+2^2+3^2; 62=1^2+5^2+6^2.

MATHEMATICA

f[upto_]:=Module[{max=Floor[Sqrt[upto]]}, Select[Union[Total/@ (Subsets[ Range[ max], {3}]^2)], #<=upto&]]; f[150]  (* Harvey P. Dale, Mar 24 2011 *)

PROG

(PARI) is_A004432(n)=for(x=1, sqrtint(n\3), for(y=x+1, sqrtint((n-1-x^2)\2), issquare(n-x^2-y^2)&return(1)))  \\ - M. F. Hasler, Feb 02 2013

(Haskell)

a004432 n = a004432_list !! (n-1)

a004432_list = filter (p 3 $ tail a000290_list) [1..] where

   p k (q:qs) m = k == 0 && m == 0 ||

                  q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)

-- Reinhard Zumkeller, Apr 22 2013

CROSSREFS

Cf. A001974, A024803, A025339, A025442.

Cf. A000290, A003995, A004431, A004433, A004434, A224981, A224982, A224983.

Sequence in context: A114985 A001944 A024803 * A025339 A224771 A096017

Adjacent sequences:  A004429 A004430 A004431 * A004433 A004434 A004435

KEYWORD

nonn,easy,nice

AUTHOR

N. J. A. Sloane

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 23 16:45 EDT 2017. Contains 288666 sequences.