login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A373156
a(n) = 1 if the 2-adic and the 3-adic valuations of n are equal, otherwise 0.
2
1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1
OFFSET
1
FORMULA
a(n) = [A007814(n) == A007949(n)], where [ ] is the Iverson bracket.
Sum_{k=1..n} a(k) ~ (2/5) * n. - Amiram Eldar, May 31 2024
MATHEMATICA
a[n_] := Boole[IntegerExponent[n, 2] == IntegerExponent[n, 3]];
Table[a[n], {n, 1, 121}] (* Robert P. P. McKone, May 28 2024 *)
PROG
(PARI) A373156(n) = (valuation(n, 2)==valuation(n, 3));
CROSSREFS
Characteristic function of A064615.
Sequence in context: A071906 A104107 A120532 * A320106 A303561 A284680
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 28 2024
STATUS
approved