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.

Showing 1-2 of 2 results.

A099584 Exponent of 3 in factorization of prime(n) - 1.

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Oct 24 2004

Keywords

Comments

By Dirichlet's theorem on arithmetic progressions, the asymptotic density of primes p such that p == 1 (mod 3^k) within all the primes is 1/(2*3^(k-1)), for k >= 1. This is also the asymptotic density of terms in this sequence that are >= k. Therefore, the asymptotic density of the occurrences of k in this sequence is d(k) = 1/(2*3^(k-1)) - 1/(2*3^k) = 1/3^k, and the asymptotic mean of this sequence is Sum_{k>=1} k*d(k) = 3/4. - Amiram Eldar, Mar 14 2025

Crossrefs

Programs

  • Magma
    [Valuation(NthPrime(n)-1, 3): n in [1..110]]; // Bruno Berselli, Aug 05 2013
  • Maple
    seq(padic:-ordp(ithprime(i)-1,3), i=1..200); # Robert Israel, Mar 02 2018
  • Mathematica
    Table[IntegerExponent[Prime[n] - 1, 3], {n, 110}] (* Bruno Berselli, Aug 05 2013 *)
  • PARI
    forprime(p=2, 700, print1(valuation(p-1,3),", ")); \\ Bruno Berselli, Aug 05 2013
    

Formula

a(n) = A007949(A006093(n)).
prime(n) - 1 = 3^a(n) * A099585(n).

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).
Showing 1-2 of 2 results.