A244279
Numerators of the n-th iteration of the alternating continued fraction of the positive integers, initiated with (1 + ...).
Original entry on oeis.org
1, 1, 7, 17, 127, 547, 5111, 31865, 358781, 2938437, 38808271, 394282041, 5982064475, 72608885159, 1245025688399, 17581129642961, 336297031232409, 5417081623572649, 114375064174857015, 2069902867431592833, 47819312187294567447, 960634689914268797707
Offset: 1
a(1) = 1/(1+1) = 1/2;
a(2) = 1/(1+1/(2-1)) = 1/2;
a(3) = 1/(1+1/(2-1/(3+1))) = 7/11;
a(4) = 1/(1+1/(2-1/(3+1/(4-1)))) = 17/27.
-
seq(numer(numtheory:-cfrac([0, [1,1], seq([(-1)^j,j],j=2..n),[(-1)^(n+1),1]])), n = 1..40); # Robert Israel, Jan 17 2016
-
a(n) = if(n%2==0,s=-1,s=1); t=1; while(n>0, t=n+s/t; n--; s=-s); numerator(t=1/t)
vector(30, n, a(n)) \\ Colin Barker, Jul 20 2014
A262957
Numerators of the n-th iteration of the alternating continued fraction formed from the positive integers, starting with (1 - ...).
Original entry on oeis.org
2, 3, 19, 64, 538, 2833, 29169, 210308, 2572158, 23595915, 334778571, 3732092084, 60305234822, 791741083537, 14359827157009, 217037153818264, 4366918714540522, 74685204276602819, 1651116684587556019, 31524723785455714840, 759659139498065625218, 16017463672140861567617
Offset: 1
(1-1/(2+1)) = 2/3, so a(1) = 2;
(1-1/(2+1/(3-1))) = 3/5, so a(2) = 3;
(1-1/(2+1/(3-1/(4+1)))) = 19/33, so a(3) = 19;
(1-1/(2+1/(3-1/(4+1/(5-1))))) = 64/111, so a(4) = 64.
Same principle as
A244279 and
A244280 - except here we begin with subtraction rather than addition.
-
P[1]:= 2: P[2]:= 3:
Q[1]:= 3; Q[2]:= 5;
for i from 2 to 100 do
P[i+1]:= ((-1)^i*(i-1) + i^2 + 2*i)/(i-(-1)^i)*P[i] + (1 + (i+1)*(-1)^i)/((-1)^i-i)*P[i-1];
Q[i+1]:= ((-1)^i*(i-1) + i^2 + 2*i)/(i-(-1)^i)*Q[i] + (1 + (i+1)*(-1)^i)/((-1)^i-i)*Q[i-1];
od:
seq(numer(P[i]/Q[i]),i=1..100); # Robert Israel, Dec 22 2015
-
a(n) = if(n%2==0, s=-1, s=1); t=1; while(n>-1, t=n+1+s/t; n--; s=-s); denominator(t=1/t)
vector(30, n, a(n)) \\ Mohamed Sabba, Dec 22 2015
A263295
Denominators of the n-th iteration of the alternating continued fraction formed from the positive integers, starting with (1 - ...).
Original entry on oeis.org
3, 5, 33, 111, 933, 4913, 50585, 364717, 4460647, 40920133, 580574377, 6472209467, 104581586665, 1373040648769, 24902871413201, 376386726269561, 7573128424949291, 129519388933667493, 2863373356440803473, 54670305859684290279, 1317404009250178503245
Offset: 1
(1-1/(2+1)) = 2/3, so a(1) = 3;
(1-1/(2+1/(3-1))) = 3/5, so a(2) = 5;
(1-1/(2+1/(3-1/(4+1)))) = 19/33, so a(3) = 33;
(1-1/(2+1/(3-1/(4+1/(5-1))))) = 64/111, so a(4) = 111.
Same principle as
A244279 and
A244280 - except here we begin with subtraction rather than addition.
-
a(n) = if(n%2==0, s=-1, s=1); t=1; while(n>0, t=n+1+s/t; n--; s=-s); denominator(t=1/t)
vector(30, n, a(n)) \\ corrected by Mohammed Sabba, Dec 22 2015
Showing 1-3 of 3 results.
Comments