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.

A227990 3^a(n) is the highest power of 3 dividing prime(n)+1.

This page as a plain text file.
%I A227990 #32 Mar 14 2025 08:59:34
%S A227990 1,0,1,0,1,0,2,0,1,1,0,0,1,0,1,3,1,0,0,2,0,0,1,2,0,1,0,3,0,1,0,1,1,0,
%T A227990 1,0,0,0,1,1,2,0,1,0,2,0,0,0,1,0,2,1,0,2,1,1,3,0,0,1,0,1,0,1,0,1,0,0,
%U A227990 1,0,1,2,0,0,0,1,1,0,1,0,1,0,3,0,0,1,2
%N A227990 3^a(n) is the highest power of 3 dividing prime(n)+1.
%C A227990 This is the 3-adic valuation of prime(n)+1.
%C A227990 By Dirichlet's theorem on arithmetic progressions, the asymptotic density of primes p such that p == 3^k-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
%H A227990 Amiram Eldar, <a href="/A227990/b227990.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Bruno Berselli)
%F A227990 a(n) = A007949(A008864(n)).
%t A227990 Table[IntegerExponent[Prime[n] + 1, 3], {n, 100}]
%o A227990 (PARI) forprime(p=2, 700, print1(valuation(p+1,3),", "));
%o A227990 (Magma) [Valuation(NthPrime(n)+1, 3): n in [1..100]];
%Y A227990 Cf. A007949, A008864, A023512 (2-adic valuation of prime(n)+1), A099584 (3-adic valuation of prime(n)-1), A227991 (associated powers of 3).
%K A227990 nonn,easy
%O A227990 1,7
%A A227990 _Bruno Berselli_, Aug 05 2013