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-5 of 5 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

A223731 All positive numbers that are primitive sums of three nonzero squares.

Original entry on oeis.org

3, 6, 9, 11, 14, 17, 18, 19, 21, 22, 26, 27, 29, 30, 33, 34, 35, 38, 41, 42, 43, 45, 46, 49, 50, 51, 53, 54, 57, 59, 61, 62, 65, 66, 67, 69, 70, 73, 74, 75, 77, 78, 81, 82, 83, 86, 89, 90, 91, 93, 94, 97, 98, 99, 101, 102, 105, 106, 107, 109, 110, 113, 114, 115, 117, 118
Offset: 1

Views

Author

Wolfdieter Lang, Apr 05 2013

Keywords

Comments

These are the ordered numbers for which A223730 is not zero. The multiplicity for the number a(n) is A223730(a(n)).
According to the Halter-Koch reference the present sequence lists the ordered positive integers satisfying i) n not 0, 4, or 7 (mod 8) (see p.10, formula for r_3(n) attributed to A. Schinzel) and ii) n not from the set {1,2,5,10,13,25,37,58,85,130} with possibly one more positive integer member of this set which has to be >= 5*10^10 (if it exists at all). (Korollar 1. (b), p. 13). For this set see also A051952.
The first members with multiplicity 1 (precisely one representation) are 3, 6, 9, 11, 14, 17, 18, 19, 21, 22, 26, 27, 29, 30, 34, 35, 42, 43, 45, 46, 49, 50, 53, 61, 65, 67 ... A223732.
The first members with multiplicity 2 are 33, 38, 41, 51, 54, 57, 59, 62, 69, 74, 77, 81, 83, 90, 94, 98, 99, ... A223733.
The first members with multiplicity 3 are 66, 86, 89, 101, 110, 114, 131, 149, 153, 166, 171, 173, ... A223734.
For the complement see A223735.

Examples

			a(12) = 27 because 27 is the 12th number for which A223730 is nonzero. Because A223730(27) = 1  there is only one primitive sum of three nonzero squares which is 27 denoted by [1,1,5]:
  1^2 + 1^2 + 5^2 = 27.
a(28) = 54 has two primitive representations in question, namely [1,2,7] and [2,5,5]. A223730(54) = 2. The representation [3,3,6] is not primitive because gcd(3,3,6) = 3 not 1.
a(34) = 66 has three representations in question, namely [1,1,8], [1,4,7] and [4,5,5].
		

Crossrefs

Cf. A223730, A000408 (non-primitive case), A223735 (complement).

Programs

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

Formula

The sequence a(n) is obtained from the ordered set
{m positive integer | m = a^2 + b^2 + c^2 , a,b,c integer, 0 < a <= b <= c, gcd(a,b,c) = 1} with entries appearing only once.
Conjectured g.f.: (x^77 +2*x^76 -2*x^75 +x^74 -x^73 -x^72 +2*x^50 -x^49 +2*x^47 -2*x^46 -x^45 +x^34 +2*x^33 -2*x^32 +x^31 -x^30 -x^29 +2*x^22 -x^21 +2*x^19 -2*x^18 -x^17 +3*x^15 -2*x^14 +x^13 -x^12 -x^10 +2*x^9 +2*x^7 +2*x^6 -3*x^4 -2*x^3 -3*x^2 -3*x -3)*x / (-x^6 +x^5 +x -1). - Alois P. Heinz, Apr 06 2013

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
Showing 1-5 of 5 results.