login
A353525
a(n) = 1 if the number of trailing zeros in primorial base representation of n is odd, otherwise 0.
3
0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1
OFFSET
1
COMMENTS
a(n) = 1 if the index of the least prime not dividing n (A257993) is even, and 0 if it is odd.
Parity of A276084(n), the number of trailing zeros in the primorial base representation of n (A049345).
FORMULA
a(n) = A000035(A276084(n)).
a(n) = A059841(A257993(n)) = A000035(1+A000720(A053669(n))).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} (-1)^(k+1)/A002110(k) = 0.362306... (A132120). - Amiram Eldar, Jul 23 2022
MATHEMATICA
a[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; Boole[s[[1]] == 0 && EvenQ[FirstPosition[s, _?(# > 0 &)][[1]]]]]; Array[a, 100] (* Amiram Eldar, Mar 06 2024 *)
PROG
(PARI) A353525(n) = { for(i=1, oo, if(n%prime(i), return((i+1)%2))); }
CROSSREFS
Characteristic function of A342050.
Differs from A353529 for the first time at n=210, where a(210) = 0, while A353529(210) = 1.
Sequence in context: A288512 A157687 A189668 * A353529 A286907 A284851
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 25 2022
STATUS
approved