A099584 Exponent of 3 in factorization of prime(n) - 1.
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
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
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
Comments