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.

Showing 1-7 of 7 results.

A025427 Number of partitions of n into 3 nonzero squares.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 1, 0, 2, 0, 0, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 3, 0, 1, 2, 0, 2, 0, 1, 2, 0, 0, 1, 3, 1, 1, 2, 1, 0, 1, 1, 2, 2, 1, 2, 1, 0, 0, 3, 1, 2, 1, 0, 3, 0, 1, 3, 2, 1, 0, 1, 2, 0, 1, 1, 2, 3, 0, 3, 2, 0, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

The non-vanishing values a(n) give the multiplicities for the numbers n appearing in A000408. See also A024795 where these numbers n are listed a(n) times. For the primitive case see A223730 and A223731. - Wolfdieter Lang, Apr 03 2013

Examples

			a(27) = 2 because  1^2 + 1^2 + 5^2 = 27  = 3^2 + 3^2 + 3^2. The second representation is not primitive (gcd(3,3,3) = 3 not 1).
		

Crossrefs

Cf. A000408, A024795, A223730 (multiplicities for the primitive case). - Wolfdieter Lang, Apr 03 2013
Column k=3 of A243148.

Programs

  • Haskell
    a025427 n = sum $ map f zs where
       f x = sum $ map (a010052 . (n - x -)) $
                       takeWhile (<= div (n - x) 2) $ dropWhile (< x) zs
       zs = takeWhile (< n) $ tail a000290_list
    -- Reinhard Zumkeller, Feb 26 2015
    
  • Maple
    A025427 := proc(n)
        local a,x,y,zsq ;
        a := 0 ;
        for x from 1 do
            if 3*x^2 > n then
                return a;
            end if;
            for y from x do
                if x^2+2*y^2 > n then
                    break;
                end if;
                zsq := n-x^2-y^2 ;
                if issqr(zsq) then
                    a := a+1 ;
                end if;
            end do:
        end do:
    end proc: # R. J. Mathar, Sep 15 2015
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    a:= n-> b(n, isqrt(n), 3):
    seq(a(n), n=0..107);  # Alois P. Heinz, Jun 14 2025
  • Mathematica
    Count[PowersRepresentations[#, 3, 2], pr_ /; (Times @@ pr) > 0]& /@ Range[0, 120] (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    a(n)=if(n<3, return(0)); sum(i=sqrtint((n-1)\3)+1,sqrtint(n-2), my(t=n-i^2); sum(j=sqrtint((t-1)\2)+1,min(sqrtint(t-1),i), issquare(t-j^2))) \\ Charles R Greathouse IV, Aug 05 2024

Formula

a(A004214(n)) = 0; a(A000408(n)) > 0; a(A025414(n)) = n and a(m) != n for m < A025414(n). - Reinhard Zumkeller, Feb 26 2015
a(4n) = a(n). This is because if a number divisible by 4 is the sum of three squares, each of those squares must be even. - Robert Israel, Mar 09 2016
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010052(i) * A010052(k) * A010052(n-i-k). - Wesley Ivan Hurt, Apr 19 2019
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019

A051952 Numbers that are not a sum of 3 positive squares nor are of the form 4^a*(8b+7) and which are not multiples of 4.

Original entry on oeis.org

1, 2, 5, 10, 13, 25, 37, 58, 85, 130
Offset: 1

Views

Author

Eberhard R. Hilf, Dec 21 1999

Keywords

Comments

The asymptotic eigenvalue spectrum of the Schroedinger equation for a free particle in a box in three dimensions is known only (that is: average level density and average degeneracy) if the a(n) are finite series.
It is not known whether 130 is the largest such number or if this is the start of an infinite series.
See Theorem 6 of Grosswald's book, p. 79: every positive integer n not of the form 4^a*(8*m+7), with a and m nonnegative integers [i.e., n is a sum of three squares, proved by Legendre (1798)] and not of the form 4^b*a(n), with b a nonnegative integer, n=1,...,10, and possibly one a(11) > 5*10^10, is a sum of three non-vanishing squares. See A004214 and A000408. In the F. Halter-Koch reference, p. 13, one finds a Korollar 1 (b) stating for positive integers n, not 0, 4, 7 modulo 8: n is not the sum of three positive coprime squares if and only if n = a(n), n=1,...,10, and possibly one more number a(11) >= 5*10^10. See A223731. - Wolfdieter Lang, Apr 04 2013

Examples

			Consider a(3)=5: 1^2 +1^2 +1^2=3, too low; 1^2+1^2+2^2=6, too high. 4^1=4 too low; 4^2=16 too high; (8*0+7)=7 too low, (8*1+7)= 15 too high; thus 5 is a member of this sequence.
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 79 with p. 76.

Programs

  • Mathematica
    nmax = 1000; amax = Ceiling[Log[nmax/7]/Log[4]]; notThreeSquaresQ[n_] := Reduce[0 < a <= b <= c && n == a^2 + b^2 + c^2, {a, b, c}, Integers] === False; notOfTheFormQ[n_, a_] := Reduce[n == 4^a*(8*b+7), b, Integers] === False; notOfTheFormQ[n_] := And @@ (notOfTheFormQ[n, #] & ) /@ Range[0, amax]; Select[Range[nmax], !Mod[#, 4] == 0 && notThreeSquaresQ[#] && notOfTheFormQ[#] & ](* Jean-François Alcover, Jun 12 2012 *)

Extensions

Grosswald et al. reference from N. J. A. Sloane, Jun 07 2000

A223730 Multiplicities for representations of positive numbers n as primitive sums of three nonzero squares.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 04 2013

Keywords

Comments

Primitive sums of three nonzero squares a^2 + b^2 + c^2, with positive integers a, b and c, satisfy gcd(a,b,c) = 1. (coprimality of the three squares).
a(n) gives the number of different representations (multiplicities) of the number n >= 1 as primitive sums of three nonzero squares. If a(n) = 0 there is no such representation for n. The numbers n with a(n) not vanishing are given in A223731. The ones with a(n) = 1, 2 and 3 are in A223732, A223733 and A223734, respectively.
For the multiplicities of the positive numbers as sums of three nonzero squares see A025427. The numbers with A025427(n) >= 1 are given in A000408.
A corollary in the Halter-Koch reference (Korollar 1. (b) on p. 13) states for the positive numbers n, not 0, 4, 7 (mod 8) [otherwise n cannot be a primitive sum of three nonzero squares; see p. 11, the r_3(n) formula]: n is not the sum of three positive coprime squares if and only if n is from the set T := {1, 2, 5, 10, 13, 25, 37, 58, 85, 130, ?}, with ? possibly a number >= 5*10^10 . Therefore a(n) = 0 if and only if n >= 1 is of the form mentioned in this corollary: i) 0, 4, 7 (mod 8) or ii) in the set T.
For representations of n as a sum of three nonzero squares see the Grosswald reference, Theorem 7, p. 79. There also the above mentioned set T appears and for the Conjecture it is assumed that the extra eleventh member of T is absent.

Examples

			a(12) = 0 because the only representation of 12 as a sum of three nonzero squares is given by [2,2,2], i.e., 12 = 2^2 + 2^2 + 2^2, but this is not a primitive sum because gcd(2,2,2) = 2, not 1. Such a situation appears for n = 12, 24, 36, 44, 48, 56, 68, 72, 76, 84, 88, 96, ... For these numbers A025427(n) = 1 and a(n) = 0.
a(27) = 1 because the only primitive representation of 27 as a sum of three nonzero squares is denoted by [1,1,5]. The representation [3,3,3] is not primitive.
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.

Crossrefs

Cf. A223731, A025427 (non-primitive case), A223732, A223733, A223734.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, t, s) option remember;
          `if`(n=0, `if`(t=0 and s={}, 1, 0), `if`(i=1, `if`(t=n, 1, 0),
          `if`(t*i^2xn, 0, b(n-i^2, i, t-1, `if`(s={1}, factorset(i),
           s intersect factorset(i)))))))
        end:
    a:= n-> b(n, isqrt(n), 3, {1}):
    seq(a(n), n=1..200);  # Alois P. Heinz, Apr 06 2013
  • Mathematica
    a[n_] := Select[ PowersRepresentations[n, 3, 2], Times @@ # != 0 && GCD @@ # == 1 &] // Length; Table[a[n], {n, 1, 134}] (* Jean-François Alcover, Jun 21 2013 *)

Formula

a(n) = 0 if there is no representation of n as a primitive sum of three nonzero squares. a(n) = k >= 1 if there are k distinct such representations for n.

A223733 Positive numbers that are the sum of three nonzero squares with no common factor > 1 in exactly two ways.

Original entry on oeis.org

33, 38, 41, 51, 54, 57, 59, 62, 69, 74, 77, 81, 83, 90, 94, 98, 99, 102, 105, 107, 113, 117, 118, 121, 122, 123, 125, 126, 137, 138, 139, 141, 150, 154, 155, 158, 162, 165, 170, 177, 178, 181, 187, 195, 197, 203, 210, 211, 213, 214, 217, 218, 225, 226, 229
Offset: 1

Views

Author

Wolfdieter Lang, Apr 05 2013

Keywords

Comments

These are the increasingly ordered numbers a(n) for which A223730(a(n)) = 2. See also A223731. These are the numbers n with exactly two representation as a primitive sum of three nonzero squares (not taking into account the order of the three terms, and the number to be squared for each term is taken positive).
Conjecture: a(147) = 1885 = 16^2 + 27^2 + 30^2 = 12^2 + 29^2 + 30^2 is the largest element of this sequence. - Alois P. Heinz, Apr 06 2013

Examples

			a(1) = 33 because the smallest number n with A223730(n) = 2 is 33. The two representations of 33 are denoted by  [1, 4, 4], and [2, 2, 5].
The two representations for a(n) for n = 2..10 are denoted by
n=2,  38: [1, 1, 6], [2, 3, 5],
n=3,  41: [1, 2, 6], [3, 4, 4],
n=4,  51: [1, 1, 7], [1, 5, 5],
n=4,  54: [1, 2, 7], [2, 5, 5], ([3, 3, 6] is non-primitive)
n=5,  57: [2, 2, 7], [4, 4, 5],
n=6,  59: [1, 3, 7], [3, 5, 5],
n=7,  62: [1, 5, 6], [2, 3, 7],
n=8,  69: [1, 2, 8], [2, 4, 7],
n=9,  74: [1, 3, 8], [3, 4, 7],
n=10, 77: [2, 3, 8], [4, 5, 6].
		

Crossrefs

Programs

  • Mathematica
    threeSquaresCount[n_] := Length[ Select[ PowersRepresentations[n, 3, 2], Times @@ #1 != 0 && GCD @@ #1 == 1 & ]]; Select[ Range[300], threeSquaresCount[#] == 2 &] (* Jean-François Alcover, Jun 21 2013 *)

Formula

This sequence lists the increasingly ordered distinct members of the set S2:= {m positive integer | m = a^2 + b^2 + c^2, 0 < a <= b <= c, and there are exactly two different solutions for this m}.

A223734 Positive numbers that are the sum of three nonzero squares with no common factor > 1 in exactly three ways.

Original entry on oeis.org

66, 86, 89, 101, 110, 114, 131, 149, 153, 166, 171, 173, 174, 179, 182, 185, 186, 189, 198, 219, 221, 222, 227, 233, 234, 237, 241, 242, 245, 258, 261, 270, 274, 286, 291, 294, 302, 305, 309, 318, 323, 334, 338, 347, 349, 361, 363, 366, 377, 378, 387, 405, 410
Offset: 1

Views

Author

Wolfdieter Lang, Apr 05 2013

Keywords

Comments

These are the increasingly ordered numbers a(n) for which A223730(a(n)) = 3. See also A223731. These are the numbers n with exactly three representation as a primitive sum of three nonzero squares (not taking into account the order of the three terms, and the number to be squared for each term is taken positive).
Conjecture: a(185) = 4075 = 31^2 + 33^2 + 45^2 = 23^2 + 39^2 + 45^2 = 5^2 + 9^2 + 63^2 is the largest element of this sequence. - Alois P. Heinz, Apr 06 2013

Examples

			a(1) = 66 because the smallest number n with A223730(n) = 3 is 66. The three solutions for m = 66 are denoted by [1,1,8], [1,4,7] and [4,5,5].
For n=2..10 the three representations of a(n) are given by
n=2,   86:  [1, 2, 9],  [1, 6, 7], [5, 5, 6],
n=3,   89:  [2, 2, 9],  [2, 6, 7], [3, 4, 8],
n=4,  101:  [1, 6, 8],  [2, 4, 9], [4, 6, 7],
n=5,  110:  [1, 3, 10], [2, 5, 9], [5, 6, 7],
n=6,  114:  [1, 7, 8],  [4, 7, 7], [5, 5, 8],
n=7,  131:  [1, 3, 11], [1, 7, 9], [5, 5, 9],
n=8,  149:  [1, 2, 12], [2, 8, 9], [6, 7, 8],
n=9,  153:  [2, 7, 10], [4, 4, 11], [5, 8, 8],
n=10: 166:  [2, 9, 9],  [3, 6, 11], [6, 7, 9].
For n = 153 there is also the non-primitive representation [6,6,9] = 3*[2,2,3] not counted here.
		

Crossrefs

Programs

  • Mathematica
    threeSquaresCount[n_] := Length[ Select[ PowersRepresentations[n, 3, 2], Times @@ #1 != 0 && GCD @@ #1 == 1 & ]]; Select[ Range[500], threeSquaresCount[#] == 3 &] (* Jean-François Alcover, Jun 21 2013 *)

Formula

This sequence lists the increasingly ordered distinct members of the set S3:= {m positive integer | m = a^2 + b^2 + c^2, 0 < a <= b <= c, and there are exactly three different solutions for this m}.

A223735 Positive numbers that are not representable as a primitive sum of three nonzero squares.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 20, 23, 24, 25, 28, 31, 32, 36, 37, 39, 40, 44, 47, 48, 52, 55, 56, 58, 60, 63, 64, 68, 71, 72, 76, 79, 80, 84, 85, 87, 88, 92, 95, 96, 100, 103, 104, 108, 111, 112, 116, 119, 120, 124, 127, 128, 130, 132, 135, 136, 140, 143, 144
Offset: 1

Views

Author

Wolfdieter Lang, Apr 06 2013

Keywords

Comments

This is the complement of A223731. There an F. Halter-Koch reference is given.

Examples

			For a(1) up to a(7) there is no representation as sum of three nonzero squares.
a(8) = 12 because the only representation of 12 as a sum of nonzero squares is given by [a,b,c] = [2,2,2] = 2*[1,1,1], and this is not a primitive sum because gcd(2,2,2) = 2, not 1.
		

Crossrefs

Programs

  • Mathematica
    notThreeSquaresQ[n_] := Select[ PowersRepresentations[n, 3, 2], Times @@ #1 != 0 && GCD @@ #1 == 1 & ] == {}; Select[Range[200], notThreeSquaresQ] (* Jean-François Alcover, Jun 21 2013 *)

Formula

a(n) has no representation as a^2 + b^2 + c^2 with 0 < a <= b <= c and gcd(a,b,c) = 1.
Conjectured g.f.: (2*x^61 -x^60 +2*x^59 -x^58 -2*x^57 +x^43 +3*x^42 -3*x^41 +x^40 -2*x^39 +2*x^32 -x^31 +2*x^30 -x^29 -2*x^28 +x^23 +3*x^22 -3*x^21 +x^20 -2*x^19 +x^18 +2*x^16 -3*x^14 +x^12 +3*x^11 -x^10 +x^6 -x^5 +x^4 +2*x^2 +x +1)*x / (x^4 -x^3 -x +1). - Alois P. Heinz, Apr 06 2013

A235533 Positive integers n that cannot be represented as the form of a+b+c or a+b-c where a, b, c are perfect square numbers not larger than n (including 0).

Original entry on oeis.org

15, 55, 87, 95, 143, 255, 303, 447, 551, 735, 1007, 1295, 2103, 2407, 3495, 5447, 5727
Offset: 1

Views

Author

Iodizon Aleph, Jan 11 2014

Keywords

Comments

No other terms < 10^8. Sequence is probably finite. - Giovanni Resta, Jan 16 2014

Crossrefs

Cf. A223731.
Showing 1-7 of 7 results.