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

%I #74 Sep 20 2020 08:19:43

%S 1,2,6,8,6,10,14,12,16,18,16,24,30,18,30,32,20,48,38,28,40,42,36,48,

%T 56,32,54,60,36,58,62,48,84,66,48,72,72,60,80,80,54,82,96,60,88,112,

%U 64,108,96,60,102,104,96,106,110,76,112,144,84,128,110,80,150,128

%N 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.

%C Set b(m) = a(n) for m = 2*n-1, and b(m) = 0 for m even.

%C 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.

%C 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]

%H Andrew Howroyd, <a href="/A278081/b278081.txt">Table of n, a(n) for n = 1..500</a>

%H Petros Hadjicostas, <a href="/A278081/a278081.r.txt">Slight modification of Mallows' R program</a>. [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, 0, 2), where r = 0 and s = 2. To get the 1/12 of these counts with no zeros, type gc(seq(1,59,2), 0, 2)[,3]/12. As stated in the comments, we get the same sequence with r = 4 and s = 6, i.e., we may type gc(seq(1,59,2), 4, 6)[,3]/12.]

%H Colin Mallows, <a href="/A278081/a278081_2.txt">R programs for A278081-A278086</a>.

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

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

%t sqrtint = Floor[Sqrt[#]]&;

%t 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};

%t 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];

%t Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 100}] (* _Jean-François Alcover_, Sep 20 2020, after _Andrew Howroyd_ *)

%o (PARI)

%o 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))}

%o 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

%Y Cf. A005886, A046897, A278082, A278083, A278084, A278085, A278086.

%K nonn

%O 1,2

%A _Colin Mallows_, Nov 14 2016

%E Terms a(51) and beyond from _Andrew Howroyd_, Aug 02 2018

%E Name and example section edited by _Petros Hadjicostas_, Apr 21 2020

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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)