login
A071374
0 iff n is of the form 4^a*(8k+7), otherwise 1.
4
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1
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
1's complement to A072401. Cf. A071377.
Sequence in context: A212793 A307420 A129667 * A071025 A077010 A330548
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 12 2002
STATUS
approved