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.

A068503 Highest power of 3 dividing prime(n)-1.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 9, 1, 1, 3, 9, 1, 3, 1, 1, 1, 3, 3, 1, 9, 3, 1, 1, 3, 1, 3, 1, 27, 1, 9, 1, 1, 3, 1, 3, 3, 81, 1, 1, 1, 9, 1, 3, 1, 9, 3, 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 27, 3, 1, 3, 1, 9, 1, 3, 1, 3, 3, 1, 3, 1, 1, 3, 3, 27, 1, 1, 9, 1, 3, 1, 3, 1, 27, 3, 1, 1, 3, 1, 3, 1, 1, 243, 1, 3, 1, 1, 1, 9, 27
Offset: 1

Views

Author

Benoit Cloitre, Mar 11 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 3^IntegerExponent[Prime[n] - 1, 3]; Array[a, 100] (* Amiram Eldar, May 14 2022 *)
  • PARI
    a(n) = 3^valuation(prime(n)-1, 3); \\ Michel Marcus, Nov 24 2013

Formula

a(n) = A038500(A006093(n)). - Michel Marcus, Nov 24 2013
a(n) = 3^A099584(n). - Michel Marcus, Nov 24 2013