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.

A239690 Base 4 sum of digits of prime(n).

Original entry on oeis.org

2, 3, 2, 4, 5, 4, 2, 4, 5, 5, 7, 4, 5, 7, 8, 5, 8, 7, 4, 5, 4, 7, 5, 5, 4, 5, 7, 8, 7, 5, 10, 5, 5, 7, 5, 7, 7, 7, 8, 8, 8, 7, 11, 4, 5, 7, 7, 10, 8, 7, 8, 11, 7, 11, 2, 5, 5, 7, 4, 5, 7, 5, 7, 8, 7, 8, 7, 4, 8, 7, 5, 8, 10, 7, 10, 11, 5, 7, 5, 7, 8, 7, 11, 7
Offset: 1

Views

Author

Tom Edgar, Mar 24 2014

Keywords

Comments

a(n) is the rank of prime(n) in the base-4 dominance order on the natural numbers.

Examples

			The sixth prime is 13, 13 in base 4 is (3,1) so a(6)=3+1=4.
		

Crossrefs

Programs

  • Haskell
    a239690 = a053737 . a000040  -- Reinhard Zumkeller, Mar 20 2015
  • Magma
    [&+Intseq(NthPrime(n),4): n in [1..100]]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 4], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • Sage
    [sum(i.digits(base=4)) for i in primes_first_n(200)]
    

Formula

a(n) = A053737(A000040(n)).