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.
%I A099584 #17 Mar 14 2025 06:23:03 %S A099584 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, %T A099584 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, %U A099584 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 %N A099584 Exponent of 3 in factorization of prime(n) - 1. %C A099584 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 %H A099584 Robert Israel, <a href="/A099584/b099584.txt">Table of n, a(n) for n = 1..10000</a> %F A099584 a(n) = A007949(A006093(n)). %F A099584 prime(n) - 1 = 3^a(n) * A099585(n). %p A099584 seq(padic:-ordp(ithprime(i)-1,3), i=1..200); # _Robert Israel_, Mar 02 2018 %t A099584 Table[IntegerExponent[Prime[n] - 1, 3], {n, 110}] (* _Bruno Berselli_, Aug 05 2013 *) %o A099584 (PARI) forprime(p=2, 700, print1(valuation(p-1,3),", ")); \\ _Bruno Berselli_, Aug 05 2013 %o A099584 (Magma) [Valuation(NthPrime(n)-1, 3): n in [1..110]]; // _Bruno Berselli_, Aug 05 2013 %Y A099584 Cf. A006093, A007949, A023506, A099585, A227990. %K A099584 nonn,easy %O A099584 1,8 %A A099584 _Ralf Stephan_, Oct 24 2004