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

A278085 1/4 of the number of primitive integral quadruples with sum = 3*n and sum of squares = 3*n^2.

Original entry on oeis.org

1, 1, 3, 0, 6, 3, 6, 0, 9, 6, 12, 0, 12, 6, 18, 0, 18, 9, 18, 0, 18, 12, 24, 0, 30, 12, 27, 0, 30, 18, 30, 0, 36, 18, 36, 0, 36, 18, 36, 0, 42, 18, 42, 0, 54, 24, 48, 0, 42, 30, 54, 0, 54, 27, 72, 0, 54, 30, 60, 0, 60, 30, 54, 0, 72, 36, 66, 0, 72, 36, 72, 0, 72, 36, 90, 0, 72, 36, 78, 0, 81, 42, 84, 0, 108, 42, 90, 0, 90, 54, 72, 0, 90, 48, 108, 0, 96, 42, 108, 0
Offset: 1

Views

Author

Colin Mallows, Nov 14 2016

Keywords

Comments

Conjecture: a(n) is multiplicative, with a(2) = 1, a(2^k) = 0 for k>=2, and for k >= 1 and p an odd prime, a(p^k) = p^(k-1)*a(p), with a(p) = p+1 for p == 5 (mod 6), a(p) = p-1 for p=1 (mod 6), and a(3) = 3. It would be nice to have a proof of this. [See A354766 for additional conjectures. - N. J. A. Sloane, Jun 19 2022]
This is also 1/4 of the number of primitive integral quadruples with sum = n and sum of squares = n^2. See A354766, A354777, A354778 for the total number of solutions. - N. J. A. Sloane, Jun 27 2022

Examples

			For the case r = s = 3, we have 4*a(3) = 12 because of (1,1,3,4) (12 permutations). Indeed, 1 + 1 + 3 + 4 = 9 = 3*3 and 1^2 + 1^2 + 3^2 + 4^2 = 27 = 3*3^2.
For the case r = s = 1, we have again 4*a(3) = 12 because of (3,3,3,3) - (1,1,3,4) = (2,2,0,-1) (12 permutations). Indeed, 2 + 2 + 0 + (-1) = 3 = 1*3 and 2^2 + 2^2 + 0^2 + (-1)^2 = 9 = 1*3^2.
		

Crossrefs

Programs

  • Mathematica
    sqrtint = Floor[Sqrt[#]]&;
    q[r_, s_, g_] := Module[{d = 2 s - r^2, h}, If[d <= 0, d == 0 && Mod[r, 2] == 0 && GCD[g, r/2] == 1, h = Sqrt[d]; If[IntegerQ[h] && Mod[r+h, 2] == 0 && GCD[g, GCD[(r+h)/2, (r-h)/2]]==1, 2, 0]]] /. {True -> 1, False -> 0};
    a[n_] := Module[{s}, s = 3 n^2; Sum[q[3 n - i - j, s - i^2 - j^2, GCD[i, j]] , {i, -sqrtint[s], sqrtint[s]}, {j, -sqrtint[s - i^2], sqrtint[s - i^2]}]/4];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Sep 20 2020, after Andrew Howroyd *)
  • PARI
    q(r, s, g)={my(d=2*s - r^2); if(d<=0, d==0 && r%2==0 && gcd(g, r/2)==1, my(h); if(issquare(d, &h) && (r+h)%2==0 && gcd(g, gcd((r+h)/2, (r-h)/2))==1, 2, 0))}
    a(n)={my(s=3*n^2); sum(i=-sqrtint(s), sqrtint(s), sum(j=-sqrtint(s-i^2), sqrtint(s-i^2), q(3*n-i-j, s-i^2-j^2, gcd(i,j)) ))/4} \\ Andrew Howroyd, Aug 02 2018

Extensions

Example edited by Petros Hadjicostas, Apr 21 2020

A278081 a(n) is 1/12 of the number of primitive quadruples with sum = 0 and sum of squares = 2*m^2, where m = 2*n - 1.

Original entry on oeis.org

1, 2, 6, 8, 6, 10, 14, 12, 16, 18, 16, 24, 30, 18, 30, 32, 20, 48, 38, 28, 40, 42, 36, 48, 56, 32, 54, 60, 36, 58, 62, 48, 84, 66, 48, 72, 72, 60, 80, 80, 54, 82, 96, 60, 88, 112, 64, 108, 96, 60, 102, 104, 96, 106, 110, 76, 112, 144, 84, 128, 110, 80, 150, 128
Offset: 1

Views

Author

Colin Mallows, Nov 14 2016

Keywords

Comments

Set b(m) = a(n) for m = 2*n-1, and b(m) = 0 for m even.
Conjecture: b(m) is multiplicative: for k >= 1, b(2^k) = 0; for p an odd prime, b(p*k) = p^(k-1)*b(p); b(p)= p + 1 for p == (5, 7, 13, 23) (mod 24); b(p) = p-1 for p == (1, 11, 17, 19) (mod 24); and b(3) = 3. It would be nice to have a proof of this.
This sequence applies also to the case sum = 4*m and ssq = 6*m^2. Generally, there is a 1-to-1 correspondence between a quadruple (h,i,j,k) with sum = r*m and ssq = s*m^2 and another with r'*m and s'*m^2, resp., if r + r'= 4, s - r = s' - r', namely (h',i',j',k') = (m,m,m,m) - (h,i,j,k). [Edited by Petros Hadjicostas, Apr 21 2020]

Examples

			For the case r = 0 and s = 2, we have a(2) = 2 = b(3) because of (-3,-1,2,2) and (-2,-2,1,3) (12 permutations each). For example, (-3) + (-1) + 2 + 2 = 0 but (-3)^2 + (-1)^2 + 2^2 + 2^2 = 18 = 2*3^2 = 2*(2*2-1)^2 (with n = 2 and m = 3).
For the case r = 4 and s = 6, we again have a(2) = 2 = b(3) because of (3,3,3,3) - (-3,-1,2,2) = (6,4,1,1) and (3,3,3,3) - (-2,-2,1,3) = (5,5,2,0) (12 permutations each). For example, 5 + 5 + 2 + 0 = 12 = 4*3 and 5^2 + 5^2 + 2^2 + 0^2 = 54 = 6*3^2 (with n = 2 and m = 3).
		

Crossrefs

Programs

  • Mathematica
    sqrtint = Floor[Sqrt[#]]&;
    q[r_, s_, g_] := Module[{d = 2s - r^2, h}, If[d <= 0, d==0 && Mod[r, 2]==0 && GCD[g, r/2]==1, h = Sqrt[d]; If[IntegerQ[h] && Mod[r+h, 2]==0 && GCD[g, GCD[(r+h)/2, (r-h)/2]]==1, 2, 0]]] /. {True -> 1, False -> 0};
    a[n_] := Module[{m = 2n - 1, s}, s = 2m^2; Sum[q[i + j, s - i^2 - j^2, GCD[i, j]], {i, -sqrtint[s], sqrtint[s]}, {j, -sqrtint[s - i^2], sqrtint[s - i^2]}]/12];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Sep 20 2020, after Andrew Howroyd *)
  • PARI
    q(r, s, g)={my(d=2*s - r^2); if(d<=0, d==0 && r%2==0 && gcd(g, r/2)==1, my(h); if(issquare(d, &h) && (r+h)%2==0 && gcd(g, gcd((r+h)/2, (r-h)/2))==1, 2, 0))}
    a(n)={my(m=2*n-1, s=2*m^2); sum(i=-sqrtint(s), sqrtint(s), sum(j=-sqrtint(s-i^2), sqrtint(s-i^2), q(i+j, s-i^2-j^2, gcd(i,j)) ))/12} \\ Andrew Howroyd, Aug 02 2018

Extensions

Terms a(51) and beyond from Andrew Howroyd, Aug 02 2018
Name and example section edited by Petros Hadjicostas, Apr 21 2020

A005886 Theta series of f.c.c. lattice with respect to tetrahedral hole.

Original entry on oeis.org

4, 12, 12, 16, 24, 12, 24, 36, 12, 28, 36, 24, 36, 36, 24, 24, 60, 36, 28, 48, 12, 60, 60, 24, 48, 48, 36, 48, 60, 24, 52, 84, 48, 24, 60, 36, 48, 96, 36, 72, 48, 36, 72, 60, 48, 52, 96, 36, 60, 96, 24, 72, 108, 24, 48, 60, 72, 96, 84, 60, 48, 108, 36, 52, 72, 60, 108, 108, 36, 48, 108
Offset: 0

Views

Author

Keywords

Comments

Empirically, the number of integral quadruples with sum = 1, sum-of-squares = 2n-1. - Colin Mallows, Dec 31 2016

Examples

			4 + 12*x + 12*x^2 + 16*x^3 + 24*x^4 + 12*x^5 + 24*x^6 + 36*x^7 + 12*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005869, A005878, A008443. Partial sums is A121054. Cf also A278081-A278086.

Programs

Formula

a(n) = 1/2 * A005878(n) = 2 * A005869(n) = 4 * A008443(n). - Michael Somos, May 31 2012

Extensions

Terms a(50) onward added by G. C. Greubel, Feb 20 2018

A278082 1/12 of the number of primitive quadruples with sum = n and sum of squares = 3*n^2.

Original entry on oeis.org

1, 1, 2, 0, 4, 2, 8, 0, 6, 4, 11, 0, 14, 8, 8, 0, 18, 6, 20, 0, 16, 11, 22, 0, 20, 14, 18, 0, 30, 8, 30, 0, 22, 18, 32, 0, 36, 20, 28, 0, 42, 16, 44, 0, 24, 22, 46, 0, 56, 20, 36, 0, 52, 18, 44, 0, 40, 30, 58, 0, 62, 30, 48, 0, 56, 22, 66, 0, 44, 32, 70, 0, 74, 36, 40, 0, 88, 28, 80, 0, 54, 42, 84, 0, 72, 44, 60, 0, 88, 24, 112, 0, 60, 46, 80, 0, 96, 56, 66, 0
Offset: 1

Views

Author

Colin Mallows, Nov 14 2016

Keywords

Comments

Conjecture: a(n) is multiplicative, with a(2) = 1, a(2^k) = 0 (k >= 2); a(p^k) = p^(k-1)*a(p); a(p) = p + 1 for p == (2, 6, 7, 8, 10)(mod 11), a(p) = p - 1 for p == (1, 3, 4, 5, 9)(mod 11); and p(11) = 11. It would be nice to have a proof of this.
This sequence applies also to the case sum = 3*n and ssq = 5*n^2. - Colin Mallows, Nov 30 2016 [Edited by Petros Hadjicostas, Apr 20 2020]

Examples

			For the case r = 1 and r = 3, we have 12*a(3) = 24 because of (-3,1,1,4) and (-1,-1,0,5) (12 permutations each). For example, (-3) + 1 + 1 + 4 = 3 = 1*3 and (-3)^2 + 1^2 + 1^2 + 4^2 = 27 = 3*3^2.
For the case r = 3 and m = 5, we again have 12*a(3) = 24 because of (3,3,3,3) - (-3,1,1,4) = (6,2,2,-1) and (3,3,3,3) - (-1,-1,0,5) = (4,4,3,-2) (12 permutations each). For example, 6 + 2 + 2 + (-1) = 9 = 3*3 and 6^2 + 2^2 + 2^2 + (-1)^2  = 45 = 5*3^2.
		

Crossrefs

Programs

  • Mathematica
    sqrtint = Floor[Sqrt[#]]&;
    q[r_, s_, g_] := Module[{d = 2s - r^2, h}, If[d <= 0, d == 0 && Mod[r, 2] == 0 && GCD[g, r/2] == 1, h = Sqrt[d]; If[IntegerQ[h] && Mod[r+h, 2] == 0 && GCD[g, GCD[(r+h)/2, (r-h)/2]]==1, 2, 0]]] /. {True -> 1, False -> 0};
    a[n_] := Module[{s = 3n^2}, Sum[q[n - i - j, s - i^2 - j^2, GCD[i, j]], {i, -sqrtint[s], sqrtint[s]}, {j, -sqrtint[s - i^2], sqrtint[s - i^2]}]/12];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Sep 20 2020, after Andrew Howroyd *)
  • PARI
    q(r, s, g)={my(d=2*s - r^2); if(d<=0, d==0 && r%2==0 && gcd(g, r/2)==1, my(h); if(issquare(d, &h) && (r+h)%2==0 && gcd(g, gcd((r+h)/2, (r-h)/2))==1, 2, 0))}
    a(n)={my(s=3*n^2); sum(i=-sqrtint(s), sqrtint(s), sum(j=-sqrtint(s-i^2), sqrtint(s-i^2), q(n-i-j, s-i^2-j^2, gcd(i,j)) ))/12} \\ Andrew Howroyd, Aug 02 2018

Extensions

Example section edited by Petros Hadjicostas, Apr 21 2020

A278083 a(n) is 1/6 of the number of primitive integral quadruples with sum = 2*m and sum of squares = 2*m^2, where m = 2*n-1.

Original entry on oeis.org

1, 4, 4, 8, 12, 12, 12, 16, 16, 20, 32, 24, 20, 36, 28, 32, 48, 32, 36, 48, 40, 44, 48, 48, 56, 64, 52, 48, 80, 60, 60, 96, 48, 68, 96, 72, 72, 80, 96, 80, 108, 84, 64, 112, 88, 96, 128, 80, 96, 144, 100, 104, 128, 108, 108, 144, 112, 96, 144, 128, 132, 160
Offset: 1

Views

Author

Colin Mallows, Nov 14 2016

Keywords

Comments

Set b(m) = a(n) for m = 2*n-1, and b(m) = 0 for m even.
Conjecture: b(m) is multiplicative: for k >= 1, b(2^k) = 0; b(p^k) = p^(k-1)*b(p) for p an odd prime; b(p) = p+1 for p == 3 (mod 4); b(p) = p-1 for p == 1 (mod 4). It would be nice to have a proof of this.

Examples

			6*a(2) = 24 = 6*b(3) because of (-1,2,2,3) and (0,1,1,4) (12 permutations each). For example, (-1) + 2 + 2 + 3 = 6 = 2*3 and (-1)^2 + 2^2 + 2^2 + 3^2 = 18 = 2*3^2 (with n = 2 and m = 3 = 2*n - 1).
		

Crossrefs

Programs

  • Mathematica
    sqrtint = Floor[Sqrt[#]]&;
    q[r_, s_, g_] := Module[{d = 2 s - r^2, h}, If[d <= 0, d == 0 && Mod[r, 2] == 0 && GCD[g, r/2] == 1, h = Sqrt[d]; If[IntegerQ[h] && Mod[r + h, 2]==0 && GCD[g, GCD[(r+h)/2, (r-h)/2]]==1, 2, 0]]] /. {True -> 1, False -> 0};
    a[n_] := Module[{m = 2n - 1, s}, s = 2m^2; Sum[q[2m - i - j, s - i^2 - j^2, GCD[i, j]] , {i, -sqrtint[s], sqrtint[s]}, {j, -sqrtint[s - i^2], sqrtint[s - i^2]}]/6];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Sep 20 2020, after Andrew Howroyd *)
  • PARI
    q(r, s, g)={my(d=2*s - r^2); if(d<=0, d==0 && r%2==0 && gcd(g, r/2)==1, my(h); if(issquare(d, &h) && (r+h)%2==0 && gcd(g, gcd((r+h)/2, (r-h)/2))==1, 2, 0))}
    a(n)={my(m=2*n-1, s=2*m^2); sum(i=-sqrtint(s), sqrtint(s), sum(j=-sqrtint(s-i^2), sqrtint(s-i^2), q(2*m-i-j, s-i^2-j^2, gcd(i,j)) ))/6} \\ Andrew Howroyd, Aug 02 2018

Extensions

Terms a(51) and beyond from Andrew Howroyd, Aug 02 2018
Name and example section edited by Petros Hadjicostas, Apr 21 2020

A278084 a(n) is 1/24 of the number of primitive integral quadruples with sum = 2*m and sum of squares = 6*m^2, where m = 2*n-1.

Original entry on oeis.org

1, 2, 5, 6, 6, 12, 14, 10, 18, 20, 12, 22, 25, 18, 28, 32, 24, 30, 38, 28, 40, 42, 30, 46, 42, 36, 54, 60, 40, 60, 60, 36, 70, 66, 44, 72, 74, 50, 72, 80, 54, 82, 90, 56, 88, 84, 64, 100, 98, 72, 100, 102, 60, 106, 108, 76, 114, 110, 84, 108, 132, 80, 125, 126
Offset: 1

Views

Author

Colin Mallows, Nov 14 2016

Keywords

Comments

Set b(m) = a(n) for m = 2*n-1, and b(m) = 0 for m even.
Conjecture: b(m) is multiplicative: for k >= 1, b(2^k) = 0, and for p an odd prime, b(p^k) = p^(k-1)*b(p), with b(p) = p + 1 for p == (11, 13, 17, 19) (mod 20), b(p) = p - 1 for p == (1, 3, 7, 9) (mod 20), b(5) = 5. It would be nice to have a proof of this.

Examples

			24*a(2) = 48 = 24*b(3) because of (-4,2,3,5) and (-2,0,1,7) (24 permutations each). For example, (-2) + 0 + 1 + 7 = 6 = 2*3 and (-2)^2 + 0^2 + 1^2 + 7^2 = 54 = 6*3^2 (with n = 2 and m = 3 = 2*2 - 1).
		

Crossrefs

Programs

  • Mathematica
    sqrtint = Floor[Sqrt[#]]&;
    q[r_, s_, g_] := Module[{d = 2s - r^2, h}, If[d <= 0, d == 0 && Mod[r, 2] == 0 && GCD[g, r/2] == 1, h = Sqrt[d]; If[IntegerQ[h] && Mod[r+h, 2] == 0 && GCD[g, GCD[(r+h)/2, (r-h)/2]]==1, 2, 0]]] /. {True -> 1, False -> 0};
    a[n_] := Module[{m = 2n - 1, s}, s = 6m^2; Sum[q[2m - i - j, s - i^2 - j^2, GCD[i, j]] , {i, -sqrtint[s], sqrtint[s]}, {j, -sqrtint[s - i^2], sqrtint[s - i^2]}]/24];
    Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Sep 20 2020, after Andrew Howroyd *)
  • PARI
    q(r, s, g)={my(d=2*s - r^2); if(d<=0, d==0 && r%2==0 && gcd(g, r/2)==1, my(h); if(issquare(d, &h) && (r+h)%2==0 && gcd(g, gcd((r+h)/2, (r-h)/2))==1, 2, 0))}
    a(n)={my(m=2*n-1, s=6*m^2); sum(i=-sqrtint(s), sqrtint(s), sum(j=-sqrtint(s-i^2), sqrtint(s-i^2), q(2*m-i-j, s-i^2-j^2, gcd(i,j)) ))/24} \\ Andrew Howroyd, Aug 02 2018

Extensions

Terms a(51) and beyond from Andrew Howroyd, Aug 02 2018
Name and example section edited by Petros Hadjicostas, Apr 21 2020
Showing 1-6 of 6 results.