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.

A227991 Highest power of 3 dividing prime(n)+1.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 9, 1, 3, 3, 1, 1, 3, 1, 3, 27, 3, 1, 1, 9, 1, 1, 3, 9, 1, 3, 1, 27, 1, 3, 1, 3, 3, 1, 3, 1, 1, 1, 3, 3, 9, 1, 3, 1, 9, 1, 1, 1, 3, 1, 9, 3, 1, 9, 3, 3, 27, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 9, 1, 1, 1, 3, 3, 1, 3, 1, 3, 1, 27, 1, 1, 3, 9
Offset: 1

Views

Author

Bruno Berselli, Aug 05 2013

Keywords

Crossrefs

Cf. A068503 (highest power of 3 dividing prime(n)-1), A068504 (highest power of 2 dividing prime(n)+1), A227990.

Programs

  • Magma
    [3^Valuation(NthPrime(n)+1, 3): n in [1..100]];
  • Mathematica
    Table[3^IntegerExponent[Prime[n] + 1, 3], {n, 100}]
  • PARI
    forprime(p=2, 700, print1(3^valuation(p+1, 3), ", "));
    

Formula

a(n) = 3^A227990(n).