login
a(n) = Product_{k=1..n} (p(k+1)+p(k))/(p(k+1)-p(k)), where p(k) = prime(k).
1

%I #31 Jun 02 2022 10:25:12

%S 1,5,20,120,540,6480,48600,874800,9185400,79606800,2388204000,

%T 27066312000,527793084000,22167309528000,498764464380000,

%U 8312741073000000,155171166696000000,9310270001760000000,198619093370880000000,6852358721295360000000,493369827933265920000000

%N a(n) = Product_{k=1..n} (p(k+1)+p(k))/(p(k+1)-p(k)), where p(k) = prime(k).

%C Conjecture (T. Ordowski): a(n) is an integer for every natural n.

%C Checked up to n = 10^4. - _Amiram Eldar_, Mar 30 2022

%C Checked up to n = 10^6. - _Michael S. Branicky_, Apr 01 2022

%C Note that (a(n)-1)/(a(n)+1) is the relativistic sum of the velocities prime(k)/prime(k+1) from k = 1 to n, in units where the speed of light c = 1. - _Thomas Ordowski_, Apr 05 2022

%F a(n) = Product_{k=1..n} A001043(k)/A001223(k).

%F a(n+1) = 5 * Product_{k=1..n} A024675(k)/A028334(k+1).

%F Note that A024675(k) and A028334(k+1) are relatively prime.

%e a(4) = ((3+2)/(3-2))*((5+3)/(5-3))*((7+5)/(7-5))*((11+7)/(11-7)) = 540.

%p a:= proc(n) option remember; (p-> `if`(n=0, 1,

%p a(n-1)*(p(n+1)+p(n))/(p(n+1)-p(n))))(ithprime)

%p end:

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Apr 01 2022

%t p = Prime[Range[21]]; FoldList[Times, 1, (Rest[p] + Most[p])/(Rest[p] - Most[p])] (* _Amiram Eldar_, Apr 01 2022 *)

%o (Python)

%o from sympy import nextprime

%o from itertools import islice

%o def agen(): # generator of terms

%o n, an, p, pp = 0, 1, 2, 3

%o while True:

%o yield an

%o q, r = divmod(an*(pp+p), pp-p)

%o assert r == 0, ("Counterexample", n, p, pp)

%o n, an, p, pp = n+1, q, pp, nextprime(pp)

%o print(list(islice(agen(), 21))) # _Michael S. Branicky_, Apr 01 2022

%Y Cf. A000040, A001223, A001043, A024675, A028334.

%K nonn

%O 0,2

%A _Thomas Ordowski_, Apr 01 2022

%E More terms from _Amiram Eldar_, Apr 01 2022