%I #22 Apr 22 2026 16:25:00
%S 0,0,1,1,2,3,2,2,2,4,4,8,7,7,7,10,10,11,11,11,13,13,15,16,14,13,13,14,
%T 15,14,14,19,20,20,21,21,23,23,23,25,25,26,26,31,30,30,31,31,34,35,34,
%U 34,37,37,38,38,40,40,43,42,42,43,43,43,45,44,44,45,45
%N 2-valuation of Product_{k=1..n} (prime(k) + 1) / (prime(k+1) - prime(k)).
%C The given product is likely to be an integer for all n, because the cumulated numerators are extremely likely to have more of any given prime factor than the smallish denominators which are the prime gaps. But can it be proved that this is indeed always the case for all prime factors?
%C The sequence appears to grow slightly sub-linearly: a(10^3) = 460, a(10^4) = 3996, a(10^5) = 35962.
%H M. F. Hasler, <a href="/A390841/b390841.txt">Table of n, a(n) for n = 0..10000</a>, Nov 21 2025
%F a(n) = A007814(A390839(n)). - _Paolo Xausa_, Apr 22 2026
%e The first factors of the product are (2+1)/1 = 3, (3+1)/2 = 2, (5+1)/2 = 3, (7+1)/4 = 2, (11+1)/2 = 6, (13+1)/4 = 7/2, (17+1)/2 = 9, (19+1)/4 = 5, (23+1)/6 = 4, (29+1)/2 = 15, (31+1)/6 = 16/3, ...
%e Therefore, for the product of the first n = 0, 1, 2, 3, ... of these fractions, the cumulated number of powers of 2 is 0, 0, 1, 1, 2, 3, 2, 2, 2, 4, 4, 8, ...
%p b:= proc(n) option remember; `if`(n<1, 1, (p->
%p b(n-1)*(1+p(n))/(p(n+1)-p(n)))(ithprime))
%p end:
%p a:= n-> padic[ordp](b(n), 2):
%p seq(a(n), n=0..68); # _Alois P. Heinz_, Apr 22 2026
%t IntegerExponent[FoldList[Times, 1, Map[(#[[1]] + 1)/(#[[2]] - #[[1]]) &, Partition[Prime[Range[100]], 2, 1]]], 2] (* _Paolo Xausa_, Apr 22 2026 *)
%o (PARI) concat(s=0, vector(99, i, s+=valuation((prime(i)+1)/(prime(i+1)-prime(i)),2)))
%Y Cf. A007814 (2-valuation), A023512 (2-valuation of prime(n) + 1).
%Y Cf. A390842, A390843, A390844 (similar for 3-, 5- and 7-valuation).
%Y Cf. A390839.
%K nonn
%O 0,5
%A _M. F. Hasler_, Nov 21 2025