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.

User: Colin Mallows

Colin Mallows's wiki page.

Colin Mallows has authored 103 sequences. Here are the ten most recent ones:

A354766 1/4 of the total number of integral quadruples with sum = n and sum of squares = n^2.

Original entry on oeis.org

1, 2, 4, 2, 7, 8, 7, 2, 13, 14, 13, 8, 13, 14, 28, 2, 19, 26, 19, 14, 28, 26, 25, 8, 37, 26, 40, 14, 31, 56, 31, 2, 52, 38, 49, 26, 37, 38, 52, 14, 43, 56, 43, 26, 91, 50, 49, 8, 49, 74, 76, 26, 55, 80, 91, 14, 76, 62, 61, 56, 61, 62, 91, 2, 91, 104, 67, 38, 100, 98, 73, 26, 73, 74, 148, 38, 91, 104, 79, 14, 121, 86, 85, 56
Offset: 1

Author

N. J. A. Sloane, Jun 19 2022, based on an email from Colin Mallows, Jun 12 2022

Keywords

Comments

If instead we count only primitive quadruples (meaning quadruples (h,i,j,k) with gcd(h,i,j,k) = 1) we get A278085(n).
Conjectures from Colin Mallows, Jun 12 2022: (Start)
Given a natural number n, a "quad" for n is a quadruple q = (h,i,j,k) of integers with sum(q) = h+i+j+k = n and sum(q^2) = h^2+i^2+j^2+k^2 = n^2.
A quad q is "primitive" if gcd(h,i,j,k) = 1. Define pq(n) = A278085(n) to be the number of distinct primitive quads for n, and tq(n) (the present sequence) to be the total number of quads for n.
Conjecture 1: (Based on the data for n <= 5000) pq/4 and tq/4 are multiplicative sequences.
Conjecture 2: When n = p^k, p prime and k >= 1:
if p = 2, k = 1 then pq(q)/4 = 1 and tq(n)/4 = 2;
if p = 2, k >= 2 then pq(q)/4 = 0 and tq(n)/4 = 2;
if p = 3, k >= 1 then pq(q)/4 = n and tq(n)/4 = (3*n-1)/2;
if p == 5 (mod 6), k >= 1 then pq(q)/4 = (p+1)*n/p and tq(n)/4 = n + 2*(n-1)/(p-1);
if p == 1 (mod 6), k >= 1 then pq(q)/4 = (p-1)*n/p and tq(n)/4 = n.
(End)
Conjecture: the numbers n for which a(n) = n have a positive asymptotic density.

Examples

			Solutions for n = 1: (1,0,0,0) and all permutations thereof.
n=2: (2,0,0,0) and (1,1,1,-1).
n=3: (3,0,0,0) and (2,2,-1,0).
n=4: (4,0,0,0) and (2,2,2,-2). Eight solutions, so a(4) = 8/4 = 2. None are primitive, so A278085(4) = 0.
n=5: (5,0,0,0) and (4,2,-2,1). 4+24 solutions, so a(5) = 28/4 = 7. 24 are primitive, so A278085(5) = 24/4 = 6.
		

Crossrefs

See also A353589 (counts nondecreasing nonnegative (h,i,j,k) such that (+-h, +-i, +-j, +-k) is a solution).

Programs

  • Maple
    f:= proc(n) local d; add(g3(n-d, n^2 - d^2), d=-n .. n)/4 end proc:
    g3:= proc(x,y) option remember; local m,c;
       if x^2 > 3*y then return 0 fi;
       m:= floor(sqrt(y));
       add(g2(x-c,y - c^2), c=- m.. m)
    end proc:
    g2:= proc(x,y) option remember;
       local v;
       v:= 2*y - x^2;
       if not issqr(v) then 0
       elif v = 0 then 1
       else 2
       fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 16 2023
  • Mathematica
    f[n_] := Sum[g3[n - d, n^2 - d^2], {d, -n, n}]/4 ;
    g3[x_, y_] := g3[x, y] = Module[{m}, If[x^2 > 3*y, 0, m = Floor[Sqrt[y]]; Sum[g2[x - c, y - c^2], {c, -m, m}]]];
    g2[x_, y_] := g2[x, y] = Module[{v}, v = 2*y - x^2; Which[!IntegerQ@Sqrt[v], 0, v == 0, 1, True, 2]];
    f /@ Range[100] (* Jean-François Alcover, Mar 09 2023, after Robert Israel *)

A278086 1/12 of the number of integer quadruples with sum = 3*n and sum of squares = 7*n^2.

Original entry on oeis.org

1, 1, 4, 0, 4, 4, 6, 0, 12, 4, 10, 0, 14, 6, 16, 0, 16, 12, 19, 0, 24, 10, 22, 0, 20, 14, 36, 0, 30, 16, 32, 0, 40, 16, 24, 0, 38, 19, 56, 0, 42, 24, 42, 0, 48, 22, 46, 0, 42, 20, 64, 0, 54, 36, 40, 0, 76, 30, 60, 0, 60, 32, 72, 0, 56, 40, 68, 0, 88, 24, 72, 0, 72, 38, 80, 0, 60, 56, 80, 0, 108, 42, 82, 0, 64, 42, 120, 0, 90, 48, 84, 0, 128, 46, 76, 0, 98, 42, 120, 0
Offset: 1

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 == (2, 3, 8, 10, 12, 13, 14, 15, 18) (mod 19), a(p) = p - 1 for p == (1, 4, 5, 6, 7, 9, 11, 16, 17) (mod 19), and p(19) = 19. It would be nice to have a proof of this.
This sequence applies also to the case sum = n and ssq = 5*n^2.

Examples

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

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 = 7 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]}]/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=7*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)) ))/12} \\ Andrew Howroyd, Aug 02 2018

Extensions

Example section edited by Petros Hadjicostas, Apr 21 2020

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

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.
		

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

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

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).
		

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

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

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).
		

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

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

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.
		

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

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

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).
		

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

A265495 a(n) is the smallest k > 0 for which there exists a root quad (-k,x,y,z) such that some bend is first repeated in the n-th generation of descendants (by Descartes reflection).

Original entry on oeis.org

1, 2, 7, 6, 14, 29
Offset: 0

Author

Colin Mallows, Dec 09 2015

Keywords

Comments

Perhaps a(0) should be 0, for the quad (0,0,1,1).
Functions were written in the statistical language R to generate root quads and to generate successive generations of descendants. The n-th generation (n >= 1) contains 4*3^(n-1) quads.

Examples

			For n = 0,1,2,3,4,5, qualifying root quads are (-1,2,2,3), (-2,3,6,7), (-7,12,17,20), (-6,11,14,15), (-14,19,54,55), (-29,55,60,70). E.g., for n=3, the bend 71 appears in both the second and third generations, in the quads (-6,14,35,71) and (-6,11,42,71).
		

Crossrefs

A259345 Number of labeled single-linkage dendrograms.

Original entry on oeis.org

1, 1, 1, 30, 750
Offset: 1

Author

N. J. A. Sloane, Jun 27 2015, following a suggestion by Colin Mallows from 1981

Keywords

A211400 Rectangular array, read by upward diagonals: T(n,m) is the number of Young tableaux that can be realized as the ranks of the outer sums a_i + b_j where a = (a_1, ... a_n) and b = (b_1, ... b_m) are real monotone vectors in general position (all sums different).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 5, 1, 1, 14, 36, 14, 1, 1, 42, 295, 295, 42, 1, 1, 132, 2583, 6660, 2583, 132, 1, 1, 429, 23580
Offset: 1

Author

Colin Mallows, Feb 08 2013

Keywords

Comments

Alternatively, that can be realized as the ranks of the outer products a_i b_j where a = (a_1, ... a_n) and b = (b_1, ... b_m) are real positive monotone vectors.
The entries at T(2,n) and T(m,2) are Catalan numbers (A000108).
The original version of this sequence was
1 1 1 1 1 1 1 ...
1 2 5 14 42 132 428 ...
1 5 24 77 ...
1 14 77 ...
1 42 ...
...
but some of the later entries seem to be incorrect. - Robert J. Vanderbei, Jan 09 2015

Examples

			The vectors a = (0,2) and b = (0,4,5) give the outer sums
0  4  5  which have ranks  1  3  4
2  6  7                    2  5  6
which is one of the five 2 X 3 Young tableaux.
One of the 18 3 X 3 tableaux that cannot be realized as a set of outer sums
is  1  2  6
    3  5  7
    4  8  9.
The array begins
1      1      1      1      1      1      1      1      1 ...
1      2      5     14     42    132    429   1430   4862 ... (A000108)
1      5     36    295   2583  23580 221680    ... (A255489)
1     14    295   6660    ...
1     42   2583    ...
1    132  23580    ...
1    429 221680    ...
1   1430   ...
1   4862   ...
...
		

Crossrefs

Extensions

Corrected and extended by Robert J. Vanderbei, Jan 09 2015