login
A073781
Number of 2's in base-3 representation of n-th prime.
3
1, 0, 1, 1, 1, 0, 2, 1, 2, 1, 0, 0, 1, 1, 2, 3, 2, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 0, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 3, 3, 2, 4, 4, 4, 2, 1, 2, 3, 0, 1, 1, 0, 2, 1, 2, 2, 3, 1, 0, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 3, 1, 2, 2, 4, 1, 2, 2, 3, 3
OFFSET
1,7
LINKS
FORMULA
a(n) = A081603(A000040(n)). - Michel Marcus, Oct 02 2013
EXAMPLE
a(7)=2 as 7th prime 17 is 122 in base-3 representation.
MATHEMATICA
a2[n_] := Length[Cases[IntegerDigits[Prime[n], 3], 2]]
DigitCount[Prime[Range[90]], 3, 2] (* Harvey P. Dale, May 11 2016 *)
CROSSREFS
Sequence in context: A143947 A226518 A337518 * A048622 A105661 A082451
KEYWORD
base,easy,nonn
AUTHOR
Zak Seidov Aug 11 2002
STATUS
approved