OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Aug 29 2016
EXTENSIONS
a(16) corrected by Robert Israel, Apr 11 2021
STATUS
approved