login
A023579
Exponent of 2 in prime factorization of prime(n)+3.
1
0, 1, 3, 1, 1, 4, 2, 1, 1, 5, 1, 3, 2, 1, 1, 3, 1, 6, 1, 1, 2, 1, 1, 2, 2, 3, 1, 1, 4, 2, 1, 1, 2, 1, 3, 1, 5, 1, 1, 4, 1, 3, 1, 2, 3, 1, 1, 1, 1, 3, 2, 1, 2, 1, 2, 1, 4, 1, 3, 2, 1, 3, 1, 1, 2, 6, 1, 2, 1, 5, 2, 1, 1, 3, 1, 1, 3, 4, 2, 2, 1, 3, 1, 2, 1, 1, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 9, 2, 1
OFFSET
1,3
LINKS
FORMULA
a(n) = A007814(A113935(n)). - Michel Marcus, Sep 30 2013
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
Sequence in context: A098712 A264490 A299794 * A023577 A188139 A134557
KEYWORD
nonn
EXTENSIONS
a(1) corrected by Michel Marcus, Sep 30 2013
Name corrected by Charles R Greathouse IV, Mar 31 2014
STATUS
approved