cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 30 results. Next

A224982 Numbers that are the sum of exactly 7 distinct nonzero squares.

Original entry on oeis.org

140, 155, 168, 172, 179, 185, 188, 191, 195, 196, 200, 203, 204, 205, 211, 212, 215, 217, 219, 220, 224, 225, 227, 230, 231, 232, 233, 235, 236, 239, 240, 243, 244, 245, 246, 247, 248, 251, 252, 254, 256, 257, 259, 260, 263, 264, 265, 267, 268, 269, 270, 271
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 + 49 = 140 = A000330(7);
a(2) = 1 + 4 + 9 + 16 + 25 + 36 + 64 = 155;
a(3) = 1 + 4 + 9 + 16 + 25 + 49 + 64 = 168;
a(4) = 1 + 4 + 9 + 16 + 25 + 36 + 81 = 172;
a(5) = 1 + 4 + 9 + 16 + 36 + 49 + 64 = 179.
		

Crossrefs

Programs

  • Haskell
    a224982 n = a224982_list !! (n-1)
    a224982_list = filter (p 7 $ 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)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {7}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)

A224983 Numbers that are the sum of exactly 8 distinct nonzero squares.

Original entry on oeis.org

204, 221, 236, 240, 249, 255, 260, 261, 268, 269, 272, 276, 279, 281, 284, 285, 288, 289, 293, 295, 296, 299, 300, 303, 305, 306, 309, 311, 312, 316, 317, 320, 321, 323, 324, 325, 326, 327, 329, 332, 333, 335, 336, 337, 338, 339, 340, 341, 344, 345, 347, 348
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 = 204 = A000330(8);
a(2) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 81 = 221;
a(3) = 1 + 4 + 9 + 16 + 25 + 36 + 64 + 81 = 236;
a(4) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 100 = 240;
a(5) = 1 + 4 + 9 + 16 + 25 + 49 + 64 + 81 = 249.
		

Crossrefs

Programs

  • Haskell
    a224983 n = a224983_list !! (n-1)
    a224983_list = filter (p 8 $ 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)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {8}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)

A001974 Numbers that are the sum of 3 distinct squares, i.e., numbers of the form x^2 + y^2 + z^2 with 0 <= x < y < z.

Original entry on oeis.org

5, 10, 13, 14, 17, 20, 21, 25, 26, 29, 30, 34, 35, 37, 38, 40, 41, 42, 45, 46, 49, 50, 52, 53, 54, 56, 58, 59, 61, 62, 65, 66, 68, 69, 70, 73, 74, 75, 77, 78, 80, 81, 82, 83, 84, 85, 86, 89, 90, 91, 93, 94, 97, 98, 100, 101, 104, 105, 106, 107, 109, 110, 113
Offset: 1

Views

Author

Keywords

Comments

Also: Numbers which are the sum of two or three distinct nonzero squares. - M. F. Hasler, Feb 03 2013
According to Halter-Koch (below), a number n is a sum of 3 squares, but not a sum of 3 distinct squares (i.e., is in A001974 but not A000408), if and only if it is of the form 4^j*s, where j >= 0 and s in {1, 2, 3, 6, 9, 11, 18, 19, 22, 27, 33, 43, 51, 57, 67, 99, 102, 123, 163, 177, 187, 267, 627, ?}, where ? denotes at most one unknown number that, if it exists, is > 5*10^10. - Jeffrey Shallit, Jan 15 2017

Examples

			5 = 0^2 + 1^2 + 2^2.
		

Crossrefs

Cf. A004436 (complement).

Programs

  • Mathematica
    r[n_] := Reduce[0 <= x < y < z && x^2 + y^2 + z^2 == n, {x, y, z}, Integers]; ok[n_] := r[n] =!= False; Select[ Range[113], ok] (* Jean-François Alcover, Dec 05 2011 *)
  • Python
    from itertools import combinations
    def aupto(lim):
      s = filter(lambda x: x <= lim, (i*i for i in range(int(lim**.5)+2)))
      s3 = set(filter(lambda x: x<=lim, (sum(c) for c in combinations(s, 3))))
      return sorted(s3)
    print(aupto(113)) # Michael S. Branicky, May 10 2021

A025339 Numbers that are the sum of 3 distinct nonzero squares in exactly one way.

Original entry on oeis.org

14, 21, 26, 29, 30, 35, 38, 41, 42, 45, 46, 49, 50, 53, 54, 56, 59, 61, 65, 66, 70, 75, 78, 81, 83, 84, 91, 93, 104, 106, 107, 109, 113, 114, 115, 116, 118, 120, 121, 133, 137, 139, 140, 142, 145, 147, 152, 153, 157, 162, 164, 168, 169, 171, 178, 180, 184, 190, 196, 198, 200
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that there is a unique triple (i,j,k) with 0 < i < j < k and n = i^2 + j^2 + k^2.
By removing the terms that have a factor of 4 we obtain A096017. - T. D. Noe, Jun 15 2004

Examples

			14 is a term since 14 = 1^2+2^2+3^2.
38 is a term since 38 = 2^2+3^2+5^2 (note that 38 is also 1^2+1^2+6^2, but that is not a contradiction since here i=j).
		

Crossrefs

A subsequence of A004432.
A274226 has a somewhat similar definition but is actually a different sequence.

Programs

  • Maple
    N:= 10^4; # to get all terms <= N
    S:= Vector(N):
    for a from 1 to floor(sqrt(N/3)) do
      for b from a+1 to floor(sqrt((N-a^2)/2)) do
        c:= [$(b+1) .. floor(sqrt(N-a^2-b^2))]:
        v:= map(t -> a^2 + b^2 + t^2, c):
        S[v]:= map(`+`,S[v],1)
    od od:
    select(t -> S[t]=1, [$1..N]); # Robert Israel, Jan 03 2016
  • Mathematica
    Select[Range[200], (pr = PowersRepresentations[#, 3, 2]; Length[Select[pr, Union[#] == # && #[[1]] > 0&]] == 1)&] (* Jean-François Alcover, Feb 27 2019 *)

A161992 Numbers which squared are a sum of 3 distinct nonzero squares.

Original entry on oeis.org

7, 9, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Keywords

Comments

Square roots of squares in A004432. - R. J. Mathar, Sep 22 2009

Examples

			7^2 = 2^2 + 3^2 + 6^2. 9^2 = 1^2 + 4^2 + 8^2. 11^2 = 2^2 + 6^2 + 9^2. 15^2 = 2^2 + 5^2 + 14^2.
		

Crossrefs

Programs

  • Maple
    isA004432 := proc(n) local x,y,z2 ; for x from 1 do if x^2 > n then break; fi; for y from 1 to x-1 do z2 := n-x^2-y^2 ; if z2 < y^2 and z2 > 0 then if issqr(z2) then RETURN(true) ; fi; fi; od: od: false ; end:
    isA161992 := proc(n) isA004432(n^2) ; end:
    for n from 1 do if isA161992(n) then printf("%d\n",n) ; fi; od: # R. J. Mathar, Sep 22 2009
  • Mathematica
    lst={};Do[Do[Do[a=(x^2+y^2+z^2)^(1/2);If[a==IntegerPart[a],AppendTo[lst, a]],{z,y+1,2*5!}],{y,x+1,2*5!}],{x,5!}];lst;q=Take[Union[%],150]
  • PARI
    is(n) = n>>=valuation(n, 2); n > 5 \\ David A. Corneth, Sep 18 2020

Extensions

Definition rephrased by R. J. Mathar, Sep 22 2009

A024803 Numbers that are the sum of 3 distinct nonzero squares, including repetitions.

Original entry on oeis.org

14, 21, 26, 29, 30, 35, 38, 41, 42, 45, 46, 49, 50, 53, 54, 56, 59, 61, 62, 62, 65, 66, 69, 69, 70, 74, 74, 75, 77, 77, 78, 81, 83, 84, 86, 86, 89, 89, 90, 90, 91, 93, 94, 94, 98, 98, 101, 101, 101, 104, 105, 105, 106, 107, 109, 110, 110, 110, 113, 114, 115, 116, 117
Offset: 1

Views

Author

Keywords

Comments

Numbers n = x^2 + y^2 + z^2, with 0
Records of 1,2,3 etc. repetitions are set by the numbers 14, 62, 101, 161, 206, 314, 341, 446, 689, 734, 854, 1106, 1154, 1286, 1454 etc.; see A025415. - R. J. Mathar, Mar 15 2007

Examples

			14 = 1^2 + 2^2 + 3^2.
62 = 1^2 + 5^2 + 6^2 = 2^2 + 3^2 + 7^2.
105 = 1^2 + 2^2 + 10^2 = 4^2 + 5^2 + 8^2.
122 = 3^2 + 7^2 + 8^2 = 4^2 + 5^2 + 9^2.
		

Crossrefs

Programs

  • Maple
    A024803 := proc(n) local a,x,y,z ; a := 0 ; for x from 1 to floor(sqrt(n)) do for y from x+1 to floor(sqrt(n-x^2)) do z := n-x^2-y^2 ; if issqr(z) then z := sqrt(z) ; if z>y and z>x then a := a+1 ; fi ; fi ; od ; od ; RETURN(a) ; end: for n from 1 to 200 do a := A024803(n) : for i from 1 to a do printf("%d ",n) ; od ; od : # R. J. Mathar, Mar 15 2007

Extensions

Zak Seidov pointed out that there were errors. These have now been corrected. - N. J. A. Sloane, Dec 05 2006
More terms from R. J. Mathar, Mar 15 2007

A033985 Number of partitions of n into two or more distinct nonzero squares.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 0, 2, 2, 0, 0, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 2, 3, 1, 0, 4, 3, 0, 1, 2, 2, 1, 0, 1, 4, 3, 0, 2, 4, 2, 1, 2, 2, 1, 2, 3, 3, 2, 1, 3, 6, 3, 0, 2, 5, 3, 0, 1, 3, 3, 2
Offset: 1

Author

Keywords

Crossrefs

Formula

G.f.: Product_{k>=1} (1+x^(k^2)) - Sum_{k>=1} x^(k^2). - Sean A. Irvine, Jul 26 2020

Extensions

Title improved by Sean A. Irvine, Jul 26 2020

A224771 Numbers that are the sum of 3 distinct and primitive nonzero squares.

Original entry on oeis.org

14, 21, 26, 29, 30, 35, 38, 41, 42, 45, 46, 49, 50, 53, 54, 59, 61, 62, 65, 66, 69, 70, 74, 75, 77, 78, 81, 83, 86, 89, 90, 91, 93, 94, 98, 101, 105, 106, 107, 109, 110, 113, 114, 115, 117, 118, 121, 122, 125, 126, 129, 131, 133, 134, 137, 138, 139, 141, 142, 145
Offset: 1

Author

Wolfdieter Lang, Apr 19 2013

Keywords

Comments

This sequence gives the increasingly ordered numbers m which satisfy A224772(m) > 0.
This sequence is a proper subsequence of A004432. The first imprimitive members of A004432 are 56, 84, 104, 116, 120, 140, 152, 164, 168, 180, 184, 196, 200, ...

Examples

			The first triples (a, b, c) are:
n=1,  14: (1, 2, 3),
n=2,  21: (1, 2, 4),
n=3,  26: (1, 3, 4),
n=4,  29: (2, 3, 4),
n=5,  30: (1, 2, 5),
n=6,  35: (1, 3, 5),
n=7,  38  (2, 3, 5),
n=8,  41: (1, 2, 6),
n=9,  42: (1, 4, 5),
n=10, 45: (2, 4, 5),
...
The first member with two different triples is a(18) = 62 with the triples (1, 5, 6), (2, 3, 7).
The first member with three different triples is a(36) = 101  with the triples (1, 6, 8), (2, 4, 9) and (4, 6, 7).
		

Crossrefs

Cf. A224772 (multiplicities), A224773 (one half of the even members), A004432, A025442.

Programs

  • Mathematica
    nn = 150; t = Table[0, {nn^2}]; Do[If[GCD[a, b, c] == 1, n = a^2 + b^2 + c^2; If[n <= nn^2, t[[n]]++]], {a, nn}, {b, a + 1, nn}, {c, b + 1, nn}]; Flatten[Position[t, ?(# > 0 &)]] (* _T. D. Noe, Apr 20 2013 *)

Formula

a(n) is the n-th largest number m which satisfies: m = a^2 + b^2 + c^2, with integers a, b, and c, 0 < a < b < c, and gcd(a,b,c) = 1. Such a solution is denoted by the triple (a, b, c).

A240227 All even positive integers which have at least one 'balanced' representation as a sum of three distinct nonzero squares.

Original entry on oeis.org

14, 26, 38, 42, 56, 62, 74, 78, 86, 98, 104, 114, 122, 126, 134, 146, 152, 158, 168, 182, 186, 194, 206, 218, 222, 224, 234, 248, 254, 258, 266, 278, 294, 296, 302, 312, 314, 326, 338, 342, 344, 350, 362, 366, 378, 386, 392, 398, 402, 416, 422, 434, 438, 446, 456, 458, 474, 482, 488, 494, 504, 518, 536, 542, 546, 554, 558, 566, 582, 584
Offset: 1

Author

Wolfdieter Lang, May 02 2014

Keywords

Comments

For the numbers with representations as a sum of three distinct nonzero squares see A004432. For their multiplicity see A025442.
Here only even numbers are considered, and a representation 2*m = a^2 + b^2 + c^2, a > b > c > 0 denoted by the triple (a,b,c), is called 'balanced' if a = b + c. E.g., 62 is represented by (6, 5, 1) and (7, 3, 2) but only (6, 5, 1) is balanced because 6 = 5 + 1.
The multiplicities are given in A240228.
These numbers a(n) play a role in the problem proposed in A236300: Find all numbers which are of the form (x + y + z)*(u^2 + v^2 + w^2)/2, x >= y >= z >= 0, where u = x-y, v = x-z, w = y-z, with u >= 0, v >=0, w >= 0, u - v + w = 0 and even u^2 + v^2 + w^2 >= 4. The special case (called in a comment on A236300 case (iib)) with distinct u, v, and w, each >=1, needs the numbers a(n) of the present sequence. If the triple is taken as (u, u+w, w) with u < w then the [x, y, z] values are [2*u+w, u+w, u] and the number from A236300 is (2*u+w)*(u^2 + w^2 + u*w) =(2*u+w)*a(n). If this number from A236300 has multiplicity A240228(n) >=2 then there are A240228(n) different values for [x, y, z] and corresponding different A236300 numbers.

Examples

			n  a(n) (u, v=u+w, w)  [x, y,z]  A236300 member
1:  14   (1, 3, 2)    [4, 3, 1]     8*7 =   56
2:  26   (1, 4, 3)    [5, 4, 1]   10*13 =  130
3:  38   (2, 5, 3)    [7, 5, 2]   14*19 =  266
4:  42   (1, 5, 4)    [6, 5, 1]   12*21 =  252
5:  56   (2, 6, 4)    [8, 6, 2]   16*28 =  448
6:  62   (1, 6, 5)    [7, 6, 1]   14*31 =  434
7:  74   (3, 7, 4)   [10, 7, 3]   20*37 =  740
8:  78   (2, 7, 5)    [9, 7, 2]   18*39 =  702
9:  86   (1, 7, 6)    [8, 7, 1]   16*43 =  688
10: 98   (3, 8, 5)   [11, 8, 3]   22*49 = 1078 ...
For n=11 .. 20 see the link.
		

Crossrefs

Cf. A004432, A025442, A236300, A240228 (multiplicities).

Formula

The increasingly ordered elements of the set {2*k, k positive integer : 2*k = u^2 + (u+w)^2 + w^2 with 1 <= u < w }.
a(n) = 2*A024606(n). - Robert Israel, May 21 2014

A274226 Numbers that have a unique representation as a sum of three nonzero squares, and furthermore in this representation the squares are distinct.

Original entry on oeis.org

14, 21, 26, 29, 30, 35, 42, 45, 46, 49, 50, 53, 56, 61, 65, 70, 78, 84, 91, 93, 104, 106, 109, 115, 116, 120, 133, 140, 142, 145, 157, 168, 169, 180, 184, 190, 196, 200, 202, 205, 212, 224, 235, 244, 253, 260, 265
Offset: 1

Author

Andreas Boe, Jun 14 2016

Keywords

Comments

The numbers in this sequence can be expressed as a sum of 3 positive squares in exactly one way, and those 3 squares are distinct. This is different from A025339.

Examples

			14 is a term because it can be expressed in just one way as a sum of 3 squares (1^2+2^2+3^2) and the 3 squares are different.
38 is not a term, because, even if it can be expressed as a sum of 3 distinct squares in just one way (2^2+3^2+5^2), it can also be expressed as a sum of 3 non-distinct squares (1^2+1^2+6^2). This makes 38 a member of A004432 and A025339.
		

Crossrefs

Cf. A025339, A004432, A274227 (the primes in this sequence).

Programs

  • Mathematica
    rp[n_] := Flatten@ IntegerPartitions[n, {3}, Range[Sqrt@n]^2]; Select[
    Range[265], Length[u = rp[#]] == 3 && Union[u] == Sort[u] &] (* Giovanni Resta, Jun 15 2016 *)
Previous Showing 11-20 of 30 results. Next