login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A087963
Exponent of highest power of 2 dividing 3*prime(n)+1.
3
0, 1, 4, 1, 1, 3, 2, 1, 1, 3, 1, 4, 2, 1, 1, 5, 1, 3, 1, 1, 2, 1, 1, 2, 2, 4, 1, 1, 3, 2, 1, 1, 2, 1, 6, 1, 3, 1, 1, 3, 1, 5, 1, 2, 4, 1, 1, 1, 1, 4, 2, 1, 2, 1, 2, 1, 3, 1, 6, 2, 1, 4, 1, 1, 2, 3, 1, 2, 1, 3, 2, 1, 1, 5, 1, 1, 4, 3, 2, 2, 1, 4, 1, 2, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 3, 1, 2, 1
OFFSET
1,3
LINKS
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