A237881 a(n) = 2-adic valuation of prime(n)+prime(n+1).
0, 3, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 4, 3, 7, 1, 4, 3, 1, 2, 1, 1, 2, 1, 3, 1, 4, 1, 2, 2, 5, 2, 2, 6, 1, 2, 5, 3, 2, 7, 1, 2, 1, 1, 1, 3, 1, 3, 5, 2, 2, 3, 2, 2, 2, 1, 2, 6, 3, 1, 4, 1, 3, 2, 2, 3, 1, 3, 1, 2, 4, 1, 2, 1, 1, 1, 2, 3, 2, 5, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 6, 4, 5, 2, 2, 2, 2, 2, 3, 4, 3, 2, 1, 2, 1, 3, 2, 1, 2, 5, 3, 1, 1, 4
Offset: 1
Examples
a(5)=3 because prime(5)=11, prime(6)=13, 11+13=24=2^3*3, 2-adic valuation(24)=3.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
IntegerExponent[ListConvolve[{1,1},Prime[Range[200]]],2] (* Paolo Xausa, Nov 02 2023 *)
-
PARI
{for(i=1,200,k=valuation(prime(i)+prime(i+1),2);print1(k,", "))}
-
Python
from sympy import prime def A237881(n): return (~(m:=prime(n)+prime(n+1))&m-1).bit_length() # Chai Wah Wu, Jul 08 2022
Formula
a(n) << log n; in particular, a(n) <= log_2 n + log_2 log n + O(1). - Charles R Greathouse IV, Feb 14 2014