A119014
Numerators of "Farey fraction" approximations to e.
Original entry on oeis.org
1, 0, 1, 2, 3, 5, 8, 11, 19, 30, 49, 68, 87, 106, 193, 299, 492, 685, 878, 1071, 1264, 1457, 2721, 4178, 6899, 9620, 12341, 15062, 17783, 20504, 23225, 25946, 49171, 75117, 124288, 173459, 222630, 271801, 320972, 370143, 419314, 468485, 517656, 566827
Offset: 0
The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
Cf.
A097545,
A097546 gives the similar sequence for pi.
A119015 gives the denominators for this sequence.
-
f[x_, n_] := (m = Floor[x]; f0 = {m, m + 1/2, m + 1}; r = ({a___, b_, c_, d___} /; b < x < c) :> {b, (Numerator[b] + Numerator[c]) / (Denominator[b] + Denominator[c]), c};
Join[{m, m + 1}, NestList[# /. r &, f0, n - 3][[All, 2]]]); Join[{1, 0, 1 }, f[E, 41]] // Numerator
(* Jean-François Alcover, May 18 2011 *)
A119015
Denominators of "Farey fraction" approximations to e.
Original entry on oeis.org
0, 1, 1, 1, 1, 2, 3, 4, 7, 11, 18, 25, 32, 39, 71, 110, 181, 252, 323, 394, 465, 536, 1001, 1537, 2538, 3539, 4540, 5541, 6542, 7543, 8544, 9545, 18089, 27634, 45723, 63812, 81901, 99990, 118079, 136168, 154257, 172346, 190435, 208524, 398959, 607483
Offset: 0
The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
-
f[x_, n_] := (m = Floor[x]; f0 = {m, m+1/2, m+1}; r = ({a___, b_, c_, d___} /; b < x < c) :> {b, (Numerator[b] + Numerator[c]) / (Denominator[b] + Denominator[c]), c};
Join[{m, m+1}, NestList[# /. r &, f0, n-3][[All, 2]]]);
Join[{0, 1, 1}, f[E, 43] // Denominator]
(* Jean-François Alcover, May 18 2011 *)
A143607
Numerators of principal and intermediate convergents to 2^(1/2).
Original entry on oeis.org
1, 3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521, 2273378, 3880899, 5488420, 9369319, 13250218, 22619537, 31988856, 54608393
Offset: 1
The principal and intermediate convergents to 2^(1/2) begin with 1/1, 3/2 4/3, 7/5, 10/7, ...
- Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
-
a:=[1,3,4,7,10];; for n in [6..40] do a[n]:=2*a[n-2]+a[n-4]; od; a; # Muniru A Asiru, Oct 07 2018
-
seq(coeff(series(x*(1+x)*(1+2*x+x^3)/(1-2*x^2-x^4),x,n+1), x, n), n = 1 .. 40); # Muniru A Asiru, Oct 07 2018
-
CoefficientList[Series[(1 + x)*(1 + 2*x + x^3) / (1 - 2*x^2 - x^4), {x, 0, 50}], x] (* or *)
LinearRecurrence[{0, 2, 0, 1}, {1, 3, 4, 7, 10}, 40] (* Stefano Spezia, Oct 08 2018; signature amended by Georg Fischer, Apr 02 2019 *)
-
Vec(x*(1 + x)*(1 + 2*x + x^3) / (1 - 2*x^2 - x^4) + O(x^60)) \\ Colin Barker, Jul 28 2017
A266504
a(n) = 2*a(n - 2) + a(n - 4) with a(0) = a(1) = 2, a(2) = 1, a(3) = 3.
Original entry on oeis.org
2, 2, 1, 3, 4, 8, 9, 19, 22, 46, 53, 111, 128, 268, 309, 647, 746, 1562, 1801, 3771, 4348, 9104, 10497, 21979, 25342, 53062, 61181, 128103, 147704, 309268, 356589, 746639, 860882, 1802546, 2078353, 4351731, 5017588, 10506008, 12113529, 25363747, 29244646, 61233502
Offset: 0
Cf.
A000129,
A001333,
A002203,
A002965,
A006451,
A006452,
A002965,
A038761,
A038762,
A048654,
A048655,
A054490,
A078343,
A098586,
A098790,
A100525,
A101386,
A135532,
A216134,
A216162,
A253811,
A255236,
A266504,
A266505,
A266507.
-
I:=[2,2,1,3]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
-
LinearRecurrence[{0, 2, 0, 1}, {2, 2, 1, 3}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
Table[SeriesCoefficient[(1 - x) (2 + 4 x + x^2)/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 41}] (* Michael De Vlieger, Dec 31 2015 *)
-
Vec((1-x)*(2+4*x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Colin Barker, Dec 31 2015
A140827
Interleave denominators and numerators of convergents to sqrt(3).
Original entry on oeis.org
1, 1, 2, 3, 4, 7, 11, 15, 26, 41, 56, 97, 153, 209, 362, 571, 780, 1351, 2131, 2911, 5042, 7953, 10864, 18817, 29681, 40545, 70226, 110771, 151316, 262087, 413403, 564719, 978122, 1542841, 2107560, 3650401, 5757961, 7865521, 13623482, 21489003, 29354524, 50843527, 80198051, 109552575
Offset: 0
(1+r)^(2+12*q)=(-1)^q*(a(1+18*q)*(1+r^2)+a(2+18*q)*r).
Here we write N = [d(k)d(k-1)...d(0)] for the 3-bin expansion of N.
0=[0], 1 =[1], 2=[10], 3=[100], 4=[1000], 5=[1001], 6=[1010], 7=[10000], 8=[10001], 9=[10010], 10=[10100], 11=[100000]. - _Michel Dekking_, Mar 11 2020
- Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Demontigny et al., Generalizing Zeckendorf's Theorem to f-decompositions, Journal of Number Theory 141, 135-158 (2014).
- Peter H. van der Kamp, Global classification of two-component approximately integrable evolution equations, arXiv:0710.2233 [nlin.SI], 2007-2008.
- Clark Kimberling, Best lower and upper approximates to irrational numbers, Elemente der Mathematik, 52 (1997), 122-126.
- Index entries for linear recurrences with constant coefficients, signature (0,0,4,0,0,-1).
-
N:=100: a[0]:=1: a[1]:=1: for i from 2 to N do if i mod 3 = 1 then a[i]:=a[i-1]+a[i-3] else a[i]:=a[i-1]+a[i-2] fi od:
-
idnc[n_]:=Module[{cvrgts=Convergents[Sqrt[3],n],num,den},num=Take[ Numerator[ cvrgts],{2,-1,2}];den=Denominator[cvrgts]; Riffle[den, num,3]]; idnc[30] (* Harvey P. Dale, Mar 17 2012 *)
A245935
First differences of A245934; see Comments.
Original entry on oeis.org
2, 2, 3, 5, 7, 5, 7, 5, 5, 12, 12, 5, 12, 12, 12, 17, 12, 17, 12, 12, 17, 12, 17, 12, 17, 41, 29, 41, 29, 29, 41, 29, 41, 29, 41, 29, 29, 41, 29, 41, 29, 29, 41, 29, 41, 29, 41, 29, 29, 41, 29, 41, 29, 29, 70, 70, 29, 70, 70, 70, 29, 70, 70, 29, 70, 70, 70
Offset: 1
S = A006337 (the Beatty sequence of sqrt(2)), re-indexed to start with s(0) = 1, with B = (s(0)); that is, (m,k) = (0,0)
S = (1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,...)
B'(0) = (1)
B'(1) = (2,1)
B'(2) = (1,2,1)
B'(3) = (1,2,1,1)
B'(4) = (1,2,1,1,2)
B'(5) = (1,2,1,1,2,1)
S* = (1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,...), with index sequence (1,3,5,8,13,20,25,32,37,...), with difference sequence (2,2,3,5,7,5,7,5,5,12,12,...).
-
z = 140; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = Sqrt[2]; s = Differences[Table[Floor[n*x], {n, 1, z^2}]]; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[1]]}]; cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; q = Accumulate[Join[{1}, Table[p[n], {n, 0, z}]]] (* A245934 *)
q1 = Differences[q] (* A245935 *)
A266505
a(n) = 2*a(n - 2) + a(n - 4) with a(0) = -1, a(1) = 1, a(2) = 3, a(3) = 5.
Original entry on oeis.org
-1, 1, 3, 5, 5, 11, 13, 27, 31, 65, 75, 157, 181, 379, 437, 915, 1055, 2209, 2547, 5333, 6149, 12875, 14845, 31083, 35839, 75041, 86523, 181165, 208885, 437371, 504293, 1055907, 1217471, 2549185, 2939235, 6154277, 7095941, 14857739, 17131117, 35869755, 41358175, 86597249, 99847467
Offset: 0
Cf.
A000129,
A001333,
A002203,
A002965,
A006451,
A006452,
A002965,
A038761,
A038762,
A048654,
A048655,
A054490,
A078343,
A098586,
A098790,
A100525,
A101386,
A135532,
A216134,
A216162,
A253811,
A255236,
A266504,
A266505,
A266507.
-
I:=[-1,1,3,5]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
-
a:=proc(n) option remember; if n=0 then -1 elif n=1 then 1 elif n=2 then 3 elif n=3 then 5 else 2*a(n-2)+a(n-4); fi; end: seq(a(n), n=0..50); # Wesley Ivan Hurt, Jan 01 2016
-
LinearRecurrence[{0, 2, 0, 1}, {-1, 1, 3, 5}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
Table[SeriesCoefficient[(-1 + 3 x) (1 + x)^2/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 42}] (* Michael De Vlieger, Dec 31 2015 *)
-
my(x='x+O('x^40)); Vec((-1+3*x)*(1+x)^2/(1-2*x^2-x^4)) \\ G. C. Greubel, Jul 26 2018
Original entry on oeis.org
0, 2, 10, 60, 348, 2030, 11830, 68952, 401880, 2342330, 13652098, 79570260, 463769460, 2703046502, 15754509550, 91824010800, 535189555248, 3119313320690, 18180690368890, 105964828892652, 617608282987020
Offset: 0
-
Table[Fibonacci[n, 2] Fibonacci[n + 1, 2], {n, 0, 20}] (* or *)
LinearRecurrence[{5, 5, -1}, {0, 2, 10}, 21] (* or *)
CoefficientList[Series[2 x/((x + 1) (x^2 - 6 x + 1)), {x, 0, 20}], x] (* Michael De Vlieger, Jul 17 2016 *)
A155046
List of pairs: first pair is (1,1); then follow (x,y) with (x+2y, x+y).
Original entry on oeis.org
1, 1, 3, 2, 7, 5, 17, 12, 41, 29, 99, 70, 239, 169, 577, 408, 1393, 985, 3363, 2378, 8119, 5741, 19601, 13860, 47321, 33461, 114243, 80782, 275807, 195025, 665857, 470832, 1607521, 1136689, 3880899, 2744210, 9369319, 6625109, 22619537, 15994428
Offset: 1
-
import Data.List (transpose)
a155046 n = a155046_list !! n
a155046_list = concat $ transpose [tail a001333_list, tail a000129_list]
-- Reinhard Zumkeller, Jan 01 2014
-
LinearRecurrence[{0,2,0,1}, {1,1,3,2}, 40] (* Vincenzo Librandi, Mar 14 2012 *)
NestList[{#[[1]]+2#[[2]],Total[#]}&,{1,1},20]//Flatten (* Harvey P. Dale, Nov 21 2020 *)
-
Vec(x*(1+x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Michel Marcus, Nov 28 2015
First term in two pairs corrected by
R. J. Mathar, Feb 19 2009
A160444
Expansion of g.f.: x^2*(1 + x - x^2)/(1 - 2*x^2 - 2*x^4).
Original entry on oeis.org
0, 1, 1, 1, 2, 4, 6, 10, 16, 28, 44, 76, 120, 208, 328, 568, 896, 1552, 2448, 4240, 6688, 11584, 18272, 31648, 49920, 86464, 136384, 236224, 372608, 645376, 1017984, 1763200, 2781184, 4817152, 7598336, 13160704, 20759040, 35955712, 56714752
Offset: 1
Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- W. Beinert, Villardscher Teilungskanon, Lexikon der Typographie
- W. Limbrunner, Das Quadrat, ein Wunder der Geometrie. (in German)
- Willibald Limbrunner, Family of sequences for k
- M-T. Zenner, Villard de Honnecourt and Euclidean Geoometry, Nexus Network Journal 4 (2002) 65-78.
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,2).
-
I:=[0,1,1,1]; [n le 4 select I[n] else 2*(Self(n-2) +Self(n-4)): n in [1..40]]; // G. C. Greubel, Feb 18 2023
-
LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
-
@CachedFunction
def a(n): # a = A160444
if (n<5): return ((n+1)//3)
else: return 2*(a(n-2) + a(n-4))
[a(n) for n in range(1, 41)] # G. C. Greubel, Feb 18 2023
Comments