OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A007814(3*prime(n)+1).
EXAMPLE
For n = 10: p = prime(10) = 29, 3*p + 1 = 88 = 2^3 * 11, a(10) = 3.
MATHEMATICA
ffi[x_] := Flatten[FactorInteger[x]]; e2[x_] := Part[[ffi[x]], 2]; Table[e2[3*Prime[w]+1], {w, 1, 100}]
IntegerExponent[3 * Prime[Range[100]] + 1, 2] (* Amiram Eldar, Jul 12 2024 *)
PROG
(PARI) a(n) = valuation(3*prime(n)+1, 2); \\ Michel Marcus, Sep 01 2016
(Magma) [Valuation(3*NthPrime(n)+1, 2): n in [1..80]] \\ Vincenzo Librandi, Sep 01 2016
(Python)
from sympy import prime
def A087963(n): return (~(m:=prime(n)*3+1)&m-1).bit_length() # Chai Wah Wu, Jul 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Sep 18 2003
EXTENSIONS
a(1)=0 corrected by Michel Marcus, Sep 01 2016
STATUS
approved