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.

A257567 a(n) is the largest exponent k such that 3^k divides (prime(n)^2 + 2).

Original entry on oeis.org

1, 0, 3, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 1, 2, 1, 2, 2, 1, 3, 1, 3, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 1, 4, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 2
Offset: 1

Views

Author

Zak Seidov, Apr 30 2015

Keywords

Comments

Except for n=2, all a(n) > 1 because (prime(n)^2 + 2) is divisible by 3.

Examples

			a(1) = 1 because p=prime(1)=2 and p^2 + 2 =  6 = 3^1*2,
a(2) = 0 because p=prime(2)=3 and p^2 + 2 = 11 = 3^0*11,
a(3) = 3 because p=prime(3)=5 and p^2 + 2 = 27 = 3^3.
		

Crossrefs

Cf. A007949 (3-adic valuation), A061725 (p^2+2, with p prime), A257568.

Programs

  • Mathematica
    Table[IntegerExponent[Prime[k]^2 + 2, 3], {k, 100}]
  • PARI
    a(n) = valuation(prime(n)^2+2, 3); \\ Michel Marcus, May 01 2015

Formula

a(n) = A007949(A061725(n)). - Michel Marcus, May 01 2015