OFFSET
0,2
COMMENTS
MATHEMATICA
s = 0; Reap[ Do[s = s + SquaresR[4, n]; If[IntegerQ[Sqrt[s]], Print[{n, s}]; Sow[s]], {n, 0, 5*10^6}]][[2, 1]] (* Jean-François Alcover, Jul 02 2012 *)
PROG
(Python)
from itertools import count, islice
from sympy import divisor_sigma
from sympy.ntheory.primetest import is_square
def A046896_gen(): # generator of terms
c = 0
for n in count(0):
c += int(divisor_sigma(n)<<3 if n&1 else 3*divisor_sigma(n>>(~n&n-1).bit_length())<<3 if n else 1)
if is_square(c):
yield c
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Extended by T. D. Noe, Mar 11 2009
a(15)-a(19) from Chai Wah Wu, Feb 22 2026
a(20) from Chai Wah Wu, Mar 03 2026
STATUS
approved
