OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n=1, prime(1)+3=5, and 5 is odd, so a(1)=0.
MATHEMATICA
Table[IntegerExponent[3 + Prime[n], 2], {n, 100}] (* G. C. Greubel, May 21 2019 *)
PROG
(PARI) a(n) = valuation(prime(n)+3, 2); \\ Michel Marcus, Sep 30 2013
(Magma) [Valuation(3+NthPrime(n), 2): n in [1..100]]; // G. C. Greubel, May 21 2019
(Sage) [(nth_prime(n)+3).valuation(2) for n in (1..100)] # G. C. Greubel, May 21 2019
(Python)
from sympy import prime
def A023579(n): return (~(m:=prime(n)+3)& m-1).bit_length() # Chai Wah Wu, Jul 07 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(1) corrected by Michel Marcus, Sep 30 2013
Name corrected by Charles R Greathouse IV, Mar 31 2014
STATUS
approved