OFFSET
1,28
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
E. Akhtarkavan, M. F. M. Salleh and O. Sidek, Multiple Descriptions Video Coding Using Coinciding Lattice Vector Quantizer for H.264/AVC and Motion JPEG2000, World Applied Sciences Journal 21 (2): 157-169, 2013. - From N. J. A. Sloane, Feb 11 2013
Eric Weisstein's World of Mathematics, Eulers 6n Plus 1 Theorem
MAPLE
N:= 200: # to get a(1)..a(N)
V:= Vector(N):
for y from 1 to floor(sqrt(N/3-1)) do
for x from 1 to floor(sqrt(N-3*y^2)) do
if igcd(x, y) = 1 then V[x^2 + 3*y^2]:= V[x^2+3*y^2]+1
fi
od od:
convert(V, list); # Robert Israel, Apr 03 2017
MATHEMATICA
r[n_] := Reduce[ x > 0 && y > 0 && GCD[x, y] == 1 && n == x^2 + 3 y^2, {x, y}, Integers]; a[n_] := Which[ r[n] === False, 0, r[n][[0]] === And, 1, True, Length[r[n]]]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Oct 31 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Feb 28 2004
STATUS
approved