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-4 of 4 results.

A097203 Number of 4-tuples (a,b,c,d) with 1 <= a <= b <= c <= d, a^2+b^2+c^2+d^2 = n and gcd(a,b,c,d) = 1.

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, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 2, 1, 1, 2, 1, 2, 0, 0, 3, 2, 1, 2, 1, 2, 0, 2, 2, 1, 3, 1, 2, 3, 0, 2, 4, 1, 2, 2, 1, 3, 0, 1, 3, 3, 2, 2, 4, 2, 0, 3, 2, 3, 3, 2, 3, 3, 0, 2, 5, 2, 3, 3, 2, 4, 0, 1, 5, 4, 2, 4, 2, 3, 0, 4, 4, 3
Offset: 1

Views

Author

Keywords

Comments

The old entry with this sequence number was a duplicate of A034836.
From Wolfdieter Lang, Mar 25 2013: (Start)
a(n) = 0 if n has no partition with four parts, each a (nonzero) square, and the parts have no common factor > 1.
n is not representable as a primitive sum of four nonzero squares.
If n' has a representation [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4) and sum(s(j)^2,j=1..4) = n', then [k*s(1),k*s(2),k*s(3),k*s(4)] is a representation of n := k^2*n'. Therefore, only primitive representations with gcd(s(1),s(2),s(3),s(4)) = 1 are here considered.
See A025428(n) for the multiplicity of the representations of n as a sum of four nonzero squares.
For the n values with a(n) not zero (primitively representable as a sum of four nonzero squares) see A222949. (End)

Examples

			The solutions (if any) for n <= 20 are as follows:
n = 1:
n = 2:
n = 3:
n = 4: 1 1 1 1
n = 5:
n = 6:
n = 7: 1 1 1 2
n = 8:
n = 9:
n = 10: 1 1 2 2
n = 11:
n = 12: 1 1 1 3
n = 13: 1 2 2 2
n = 14:
n = 15: 1 1 2 3
n = 16:
n = 17:
n = 18: 1 2 2 3
n = 19: 1 1 1 4
n = 20: 1 1 3 3
From _Wolfdieter Lang_, Mar 25 2013: (Start)
a(16) = 0 because 16 is not a primitive sum of four nonzero squares. The representation [2,2,2,2] of 16 is not primitive.
a(40) = 0 because the only representation as sum of four nonzero squares (A025428(4) = 1) is [2,2,4,4], but this is not primitive.
a(28) = 2 because the two primitive representations of 28 are
[1, 1, 1, 5] and [1, 3, 3, 3]. [2, 2, 2, 4] = 2*[1, 1, 1, 2] is not primitive due to 28 = 2^2*7. (End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, g, t) option remember; `if`(n=0,
          `if`(g=1 and t=0, 1, 0), `if`(i<1 or t=0 or i^2*tn, 0, b(n-i^2, i, igcd(g, i), t-1))))
        end:
    a:= n-> `if`(n<4, 0, b(n, isqrt(n-3), 0, 4)):
    seq(a(n), n=1..120);  # Alois P. Heinz, Apr 02 2013
  • Mathematica
    Clear[b]; b[n_, i_, g_, t_] := b[n, i, g, t] = If[n == 0, If[g == 1 && t == 0, 1, 0], If[i < 1 || t == 0 || i^2*t < n, 0, b[n, i-1, g, t] + If[i^2 > n, 0, b[n-i^2, i, GCD[g, i], t-1]]]]; a[n_] := If[n < 4, 0, b[n, Sqrt[n-3] // Floor, 0, 4]]; Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Apr 05 2013, translated from Alois P. Heinz's Maple program *)

Formula

If a(n) > 0 then 8 does not divide n.
a(n) = k if there are k different quadruples [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4), gcd(s(1),s(2),s(3),s(4)) = 1 and sum(s(j)^2,j=1..4) = n. If there is no such quadruple then a(n) = 0. - Wolfdieter Lang, Mar 25 2013

A223727 Numbers which are a sum of four distinct nonzero squares where the summands have no common factor > 1.

Original entry on oeis.org

30, 39, 46, 50, 51, 54, 57, 62, 63, 65, 66, 70, 71, 74, 75, 78, 79, 81, 84, 85, 86, 87, 90, 91, 93, 94, 95, 98, 99, 102, 105, 106, 107, 109, 110, 111, 113, 114, 116, 117, 118, 119, 121, 122, 123, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 139, 140
Offset: 1

Views

Author

Wolfdieter Lang, Mar 27 2013

Keywords

Comments

A primitive representation of a number m as a sum of four distinct nonzero squares is determined from a quadruple [s(1), s(2), s(3), s(4)] of integers with 0 < s(1) < s(2) < s(3) < s(4) with gcd(s(1),s(2),s(3),s(4)) = 1, and m = sum(s(j)^2, j=1..4). If m has such a primitive representation then k^2*m, with integer k > 0, has trivially a non-primitive representation. Therefore primitive representations are of interest.
For the multiplicities see A223728.
This sequence is a proper subset of A004433. The first entry of A004433 missing here is 120 = A004433(43). The first common entry with different multiplicity is A004433(72) = 156 = a(71) with two primitive representations with quadruples
[1, 3, 5, 11] and [1, 5, 7, 9]. [2, 4, 6, 10] = 2*[1, 2, 3, 5]is a non-primitive representation due to 156 = 4*39.

Examples

			a(1) = 30 because the numbers 0,...,29 have no representation as a sum of four distinct nonzero squares, and 30 has one representation given by the quadruple [1,2,3,4] which is primitive.
a(16) = 78 has three such representations given by the quadruples  [1, 2, 3, 8], [1, 4, 5, 6] and [2, 3, 4, 7] which are all primitive. Hence A223728(16) = 3. This is the first entry with more than one (primitive) representation.
a(23) = 90 has multiplicity 2 = A223728 because there are two primitive quadruples [1, 2, 6, 7] and [1, 3, 4, 8].
a(71) = 156 has multiplicity A223728(71) = 2 (see a comment above).
		

Crossrefs

Cf. A222949, A097203, A223728, A259058 (multiplicity >= 2 instances).

Formula

This sequence are the increasingly ordered members of the set {m an integer | m = sum(s(j)^2, j=1..4), with 0 < s(1) < s(2) < s(3) < s(4) and gcd(s(1),s(2),s(3),s(4)) = 1}.

A223726 Multiplicities for A004433: sum of four distinct nonzero squares.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Mar 26 2013

Keywords

Comments

The number A004433(n) can be partitioned into four distinct parts, each of which is a nonzero square, and a(n) gives the multiplicity which is the number of different partitions of this type.

Examples

			a(1) = 1 because  A004433(1) = 30 has only one representation as sum of four distinct nonzero squares, given by the quadruple [1,2,3,4]: 1^2 + 2^2 + 3^2 + 4^2 = 30.
a(16) = 3 because for A004433(3) = 78 the three different quadruples are [1, 2, 3, 8], [1, 4, 5, 6] and [2, 3, 4, 7].
a(48) = 5 because A004433(48) = 126 has five different  representations given by the five quadruples [1, 3, 4, 10], [1, 5, 6, 8], [2, 3, 7, 8], [2, 4, 5, 9], [4, 5, 6, 7].
		

Crossrefs

Formula

a(n) = k if there are k different quadruples [s(1),s(2),2(3),s(4)] with increasing positive entries with sum(s(j)^2,j=1..4) = A004433(n), n >= 1.

A224779 One half of the even numbers that are a primitive sum of four nonzero squares at least once.

Original entry on oeis.org

2, 5, 6, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 98, 99
Offset: 1

Views

Author

Wolfdieter Lang, May 09 2013

Keywords

Comments

These are the even numbers of A222949 divided by 2.
Compare with A224778 where also imprimitive sums are included. Numbers from there, not appearing here, are 8, 20, 24, 32, 36, 40, 44, 52, 56, 60, 68, 72, 76, ...

Examples

			a(1) = A222949(1)/2 = 2. The primitive representation of 4 is denoted by [1, 1, 1, 1], standing for 1^2 + 1^2 + 1^2 + 1^2.
a(8) = A222949(18)/2 =14, with two primitive representations for 28, namely [1, 1, 1, 5] and [1, 3, 3, 3]. There is also the imprimitive representation [2, 2, 2, 4].
8 does not appear because the only representation of 16 comes from [2, 2, 2, 2] which is imprimitive.
		

Crossrefs

Cf. A224778 (imprimitive case).

Formula

a(n) is one half of the n-th even number of the sequence A222949.
Showing 1-4 of 4 results.