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”).

A276133
Exponent of highest power of 2 dividing the product of the composite numbers between the n-th prime and the (n+1)-st prime.
3
0, 2, 1, 4, 2, 5, 1, 3, 6, 1, 8, 4, 1, 3, 7, 5, 2, 8, 3, 3, 4, 5, 6, 9, 3, 1, 4, 2, 5, 11, 8, 6, 1, 10, 1, 6, 7, 3, 6, 6, 2, 8, 6, 3, 1, 12, 10, 6, 2, 4, 4, 4, 8, 11, 4, 6, 1, 7, 4, 1, 11, 13, 3, 3, 3, 15, 7, 8, 2, 6, 4, 7, 7, 5, 3, 10, 7, 5, 7
OFFSET
1,2
LINKS
FORMULA
a(n) = A007814(A061214(n)).
a(n+1) = Sum_{k = A000040(n+1)..A000040(n+2)} A007814(k).
MAPLE
A:= Vector(100): q:= 2:
for n from 1 to 100 do
p:= q; q:= nextprime(q);
t:= 0;
for i from p+1 to q-1 do t:= t + padic:-ordp(i, 2) od;
A[n]:= t
od:
convert(A, list); # Robert Israel, Apr 11 2021
MATHEMATICA
IntegerExponent[#, 2]&/@(Times@@Range[#[[1]]+1, #[[2]]-1]&/@Partition[ Prime[ Range[ 80]], 2, 1]) (* Harvey P. Dale, Aug 12 2024 *)
PROG
(PARI) a(n) = valuation(prod(k=prime(n)+1, prime(n+1)-1, k), 2); \\ Michel Marcus, Aug 31 2016
(PARI) a(n) = my(p=prime(n+1), q=prime(n)); p-hammingweight(p) - (q-hammingweight(q)); \\ Kevin Ryde, Apr 11 2021
(Python)
from sympy import prime
def A276133(n): return (p:=prime(n+1)-1)-p.bit_count()-(q:=prime(n))+q.bit_count() # Chai Wah Wu, Jul 10 2022
CROSSREFS
Supersequence of A205649 (Hamming distance between twin primes).
First differences of A080085.
Sequence in context: A120988 A095979 A377781 * A307602 A054269 A373399
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(16) corrected by Robert Israel, Apr 11 2021
STATUS
approved