A227990 3^a(n) is the highest power of 3 dividing prime(n)+1.
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, 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, 1, 0, 1, 2, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 3, 0, 0, 1, 2
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Bruno Berselli)
Crossrefs
Programs
-
Magma
[Valuation(NthPrime(n)+1, 3): n in [1..100]];
-
Mathematica
Table[IntegerExponent[Prime[n] + 1, 3], {n, 100}]
-
PARI
forprime(p=2, 700, print1(valuation(p+1,3),", "));
Comments