The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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.
LINKS
Petros Hadjicostas, Slight modification of Mallows' R program. [To get the total counts for n = 1 to 120, with the zeros, i.e., the sequence (b(n): n >= 1) shown in the comments above, type gc(1:120, 2, 2), where r = 2 and s = 2. To get the 1/6 of these counts with no zeros, type gc(seq(1,59,2), 2, 2)[,3]/6.]
EXAMPLE
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).
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 *)
PROG
(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
CROSSREFS
Sequence in context: A309456 A004024 A292276 * A086663 A003829 A194697
KEYWORD
nonn
AUTHOR
Colin Mallows, Nov 14 2016
EXTENSIONS
Terms a(51) and beyond from Andrew Howroyd, Aug 02 2018
Name and example section edited by Petros Hadjicostas, Apr 21 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 11:05 EDT 2024. Contains 372712 sequences. (Running on oeis4.)