A071374 0 iff n is of the form 4^a*(8k+7), otherwise 1.
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
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.
- Index entries for 2-automatic sequences.
Programs
-
PARI
a(n) = if(n, (n >> (2*valuation(n, 4))) % 8 < 7, 1); \\ Amiram Eldar, May 15 2025
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)
Comments