OFFSET
1,4
COMMENTS
Each SO_1^{2+}(Z) orbit has a representative (z, x, y) in Z^3 with z > x >= 0, z > y >= 0 and z >= x+y. We are looking for solutions of n = z^2 - x^2 - y^2. - Michael Somos, Jul 13 2013
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
G. J. Fox, Letter to N. J. A. Sloane, May 1991
Glenn J. Fox and Phillip E. Parker, The Lorentzian modular group and nonlinear lattices, The mathematical heritage of C. F. Gauss, 282-303, World Sci. Publishing, River Edge, NJ, 1991.
Glenn J. Fox and Phillip E. Parker, The Lorentzian modular group and nonlinear lattices II, The mathematical heritage of C. F. Gauss, 282-303, World Sci. Publishing, River Edge, NJ, 1991.
EXAMPLE
x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + 2*x^7 + 3*x^8 + 2*x^9 + x^10 + 3*x^11 + ...
a(11) = 3 since orbits(11) = [[4, 1, 2], [4, 2, 1], [6, 5, 0]] where 11 = 4^2-1^2-2^2 = 4^2-2^2-1^2 = 6^2-5^2-0^2 for the three SO_1^{2+}(Z) orbit representatives.
MATHEMATICA
a[n_] := Sum[If[Mod[n-i, 2] == 1, 0, j = (n+i*i)/2; DivisorSum[j, Boole[# >= i && j >= #*i && (j <= #^2 || (i>0 && # > i && j > #*i))]&]], {i, 0, Floor[Sqrt[n]]}]; Array[a, 105] (* Jean-François Alcover, Dec 03 2015, adapted from PARI *)
PROG
(PARI) {a(n) = my(j); if( n<1, 0, sum( i=0, sqrtint(n), if( (n-i)%2, 0, sumdiv( j = (n + i*i) / 2, d, d>=i && j>=d*i && (j<=d*d || (i>0 && d>i && j>d*i))))))} /* Michael Somos, Jul 13 2013 */
(PARI) {orbits(n) = local(j, v=[], x, y, z); if( n<1, 0, forstep( i=n%2, sqrtint(n), 2, fordiv( j = (n + i*i) / 2, d, x = d-i; y = j/d-i; z = x+y+i; if( x>=0 && y>=0 && (y<=x || (i>0 && x>0 && y>0)), v = concat([[z, y, x]], v)))); vecsort(v))} /* Michael Somos, Jul 13 2013 */
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved