A023579 Exponent of 2 in prime factorization of prime(n)+3.
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
Keywords
Examples
For n=1, prime(1)+3=5, and 5 is odd, so a(1)=0.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[Valuation(3+NthPrime(n), 2): n in [1..100]]; // G. C. Greubel, May 21 2019
-
Mathematica
Table[IntegerExponent[3 + Prime[n], 2], {n, 100}] (* G. C. Greubel, May 21 2019 *)
-
PARI
a(n) = valuation(prime(n)+3, 2); \\ Michel Marcus, Sep 30 2013
-
Python
from sympy import prime def A023579(n): return (~(m:=prime(n)+3)& m-1).bit_length() # Chai Wah Wu, Jul 07 2022
-
Sage
[(nth_prime(n)+3).valuation(2) for n in (1..100)] # G. C. Greubel, May 21 2019
Formula
Extensions
a(1) corrected by Michel Marcus, Sep 30 2013
Name corrected by Charles R Greathouse IV, Mar 31 2014