cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 24 2009

Keywords

Examples

			6th prime = 13 = 31_4, so a(6) = 2;
7th prime = 17 = 101_4, so a(7) = 3;
54th prime = 251 = 3323_4, so a(54) = 4;
55th prime = 257 = 10001_4, so a(55) = 5.
		

Crossrefs

Programs

  • Mathematica
    IntegerLength[#, 4] & /@ Prime[Range[100]] (* G. C. Greubel, Dec 17 2016 *)
  • PARI
    a(n) = #digits(prime(n), 4); \\ Michel Marcus, Dec 18 2016

Formula

a(n) = log_4 n + log_4 log n + O(1). - Charles R Greathouse IV, Mar 25 2010