A073779 Number of 0's in base-3 representation of n-th prime.
0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 3, 2, 1, 2, 1, 1, 2, 1, 1, 0, 2, 1, 0, 0, 0, 3, 2, 2, 1, 2, 2, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 3, 2, 3, 2, 3, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 1, 0, 0, 2, 1, 1, 1, 4, 3, 2, 2, 2, 2, 2, 3, 2, 1, 1, 3, 2
Offset: 1
Examples
a(10)=2 as 10th prime is 29 in base-10 representation, or 1002 in base-3 representation.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[ Multiplicity({* a: a in Intseq(p, 3) *}, 0): p in PrimesUpTo(600) ]; // Klaus Brockhaus, Oct 10 2010
-
Maple
f:= n -> numboccur(0,convert(ithprime(n),base,3)): map(f, [$1..200]); # Robert Israel, Dec 28 2018
-
Mathematica
A073779[n_] := Length[Cases[IntegerDigits[Prime[n], 3], 0]]; DigitCount[#,3,0]&/@Prime[Range[120]] (* Harvey P. Dale, Apr 26 2011 *)
Formula
Extensions
More terms from Klaus Brockhaus, Oct 10 2010
Comments