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”).

Number of digits of n-th prime written in base 4.
2

%I #20 Dec 18 2016 01:46:40

%S 1,1,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,

%T 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,

%U 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5

%N Number of digits of n-th prime written in base 4.

%H G. C. Greubel, <a href="/A163291/b163291.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = log_4 n + log_4 log n + O(1). - _Charles R Greathouse IV_, Mar 25 2010

%e 6th prime = 13 = 31_4, so a(6) = 2;

%e 7th prime = 17 = 101_4, so a(7) = 3;

%e 54th prime = 251 = 3323_4, so a(54) = 4;

%e 55th prime = 257 = 10001_4, so a(55) = 5.

%t IntegerLength[#, 4] & /@ Prime[Range[100]] (* _G. C. Greubel_, Dec 17 2016 *)

%o (PARI) a(n) = #digits(prime(n), 4); \\ _Michel Marcus_, Dec 18 2016

%Y Cf. A004678, A035100.

%K nonn,base

%O 1,3

%A _Juri-Stepan Gerasimov_, Jul 24 2009