OFFSET
0,1
COMMENTS
0 iff n is not the sum of three squares.
LINKS
Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, preprint.
Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., Vol. 98 (1992), pp. 163-197.
FORMULA
From Amiram Eldar, May 15 2025: (Start)
a(n) = 1 - A072401(n);
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/6. (End)
PROG
(PARI) a(n) = if(n, (n >> (2*valuation(n, 4))) % 8 < 7, 1); \\ Amiram Eldar, May 15 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 12 2002
STATUS
approved
