login
The OEIS is supported by the many generous donors 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. 31
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
4*a(n) gives the sums of 3 distinct nonzero even squares. - Wesley Ivan Hurt, Apr 05 2021
LINKS
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
Sequence in context: A344703 A001944 A024803 * A025339 A224771 A096017
KEYWORD
nonn,easy,nice
AUTHOR
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 05:22 EDT 2024. Contains 372431 sequences. (Running on oeis4.)