cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 27 results. Next

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

Views

Author

Joshua Zucker, May 08 2006

Keywords

Comments

"Add" (meaning here to add the numerators and add the denominators, not to add the fractions) 1/0 to 1/1 to make the fraction bigger: 2/1, 3/1. Now 3/1 is too big, so add 2/1 to make the fraction smaller: 5/2, 8/3, 11/4. Now 11/4 is too small, so add 8/3 to make the fraction bigger: 19/7, ...

Examples

			The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
		

Crossrefs

For another version see A006258.
Cf. A097545, A097546 gives the similar sequence for pi. A119015 gives the denominators for this sequence.

Programs

  • Mathematica
    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

Views

Author

Joshua Zucker, May 08 2006

Keywords

Comments

"Add" (meaning here to add the numerators and add the denominators, not to add the fractions) 1/0 to 1/1 to make the fraction bigger: 2/1, 3/1. Now 3/1 is too big, so add 2/1 to make the fraction smaller: 5/2, 8/3, 11/4. Now 11/4 is too small, so add 8/3 to make the fraction bigger: 19/7, ...

Examples

			The fractions are 1/0, 0/1, 1/1, 2/1, 3/1, 5/2, 8/3, 11/4, 19/7, ...
		

Crossrefs

For another version see A006259.
Cf. A097545, A097546 gives the similar sequence for pi. A119014 gives the numerators for this sequence.

Programs

  • Mathematica
    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

Views

Author

Clark Kimberling, Aug 27 2008

Keywords

Comments

Sequence is essentially A082766 (by omitting two terms A082766(0) and A082766(2)). - L. Edson Jeffery, Apr 04 2011
a(n) = A119016(n+2) for n>=2. - Georg Fischer, Oct 07 2018

Examples

			The principal and intermediate convergents to 2^(1/2) begin with 1/1, 3/2 4/3, 7/5, 10/7, ...
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Cf. A002965 (denominators), A082766, A119016.

Programs

  • GAP
    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
  • Maple
    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
  • Mathematica
    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 *)
  • PARI
    Vec(x*(1 + x)*(1 + 2*x + x^3) / (1 - 2*x^2 - x^4) + O(x^60)) \\ Colin Barker, Jul 28 2017
    

Formula

From Colin Barker, Jul 28 2017: (Start)
G.f.: x*(1 + x)*(1 + 2*x + x^3) / (1 - 2*x^2 - x^4).
a(n) = 2*a(n-2) + a(n-4) for n>5.
(End)

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

Views

Author

Raphie Frank, Dec 30 2015

Keywords

Comments

This sequence gives all x in N | 2*x^2 - 7(-1)^x = y^2. The companion sequence to this sequence, giving y values, is A266505.
A266505(n)/a(n) converges to sqrt(2).
Alternatively, 1/4*(3*A002203(floor[n/2]) - A002203(n-(-1)^n)), where A002203 gives the Companion Pell numbers, or, in Lucas sequence notation, V_n(2, -1).
Alternatively, bisection of A266506.
Alternatively, A048654(n -1) and A078343(n + 1) interlaced.
Alternatively, A100525(n-1), A266507(n), A038761(n) and A253811(n) interlaced.
Let b(n) = (a(n) - a(n)(mod 2))/2, that is b(n) = {1, 1, 0, 1, 2, 4, 4, 9, 11, 23, 26, 55, 64, ...}. Then:
A006452(n) = {b(4n+0) U b(4n+1)} gives n in N such that n^2 - 1 is triangular;
A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that n^2 + n + 1 is triangular (indices of Sophie Germain triangular numbers);
A216162(n) = {b(4n+0) U b(4n+2) U b(4n+1) U b(4n+3)}, sequences A006452 and A216134 interlaced.

Crossrefs

Programs

  • Magma
    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
    
  • Mathematica
    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 *)
  • PARI
    Vec((1-x)*(2+4*x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Colin Barker, Dec 31 2015

Formula

a(n) = 1/sqrt(8)*(+sqrt(2)*(1+sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n - 3*(1-sqrt(2))^(floor(n/2)-(-1)^n) + sqrt(2)*(1-sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n + 3*(1+sqrt(2))^(floor(n/2)-(-1)^n)).
a(n) = 1/4*((3*((1+sqrt(2))^floor(n/2)+(1-sqrt(2))^floor(n/2))) - (-1)^n*((1+sqrt(2))^(floor(n/2)-(-1)^n)+(1-sqrt(2))^(floor(n/2)-(-1)^n))).
a(2n) = (+sqrt(2)*(1+sqrt(2))^(n-1) - 3 *(1-sqrt(2))^(n-1) + sqrt(2)*(1-sqrt(2))^(n-1) + 3*(1 + sqrt(2))^(n-1))/sqrt(8) = A048654(n -1).
a(2n) = 1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) - ((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))) = A048654(n -1).
a(2n + 1) = (-sqrt(2)*(1+sqrt(2))^(n+1) - 3 *(1-sqrt(2))^(n+1) - sqrt(2)*(1-sqrt(2))^(n+1) + 3*(1+sqrt(2))^(n+1))/sqrt(8) = A078343(n + 1).
a(2n + 1) =1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) + ((1+sqrt(2))^(n+1)+(1-sqrt(2))^(n+1))) = A078343(n + 1).
a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A100525(n-1).
a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A266507(n).
a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038761(n).
a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A253811(n).
sqrt(2*a(n)^2 - 7(-1)^a(n))*sgn(2*n - 1) = A266505(n).
(a(2n + 1) + a(2n))/2 = A002203(n), where A002203 gives the companion Pell numbers.
(a(2n + 1) - a(2n))/2 = A000129(n), where A000129 gives the Pell numbers.
(a(2n+2) + a(2n+1))*2 = A002203(n+2)
(a(2n+2) - a(2n+1))*2 = A002203(n-1).
G.f.: (1-x)*(2+4*x+x^2) / (1-2*x^2-x^4). - 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

Views

Author

Peter H van der Kamp, Jul 18 2008, Jul 22 2008

Keywords

Comments

Coefficients of (1+r)^m modulo r^4-r^2+1.
The first few principal and intermediate convergents to 3^(1/2) are 1/1, 2/1, 3/2, 5/3, 7/4, 12/7; essentially, numerators=A143642 and denominators=A140827. - Clark Kimberling, Aug 27 2008
From Michel Dekking, Mar 11 2020: (Start)
This sequence can be seen as a generalization of the Fibonacci numbers A000045. The Zeckendorf expansion of a natural number uses the Fibonacci numbers as constituents. The Zeckendorf expansion is called a 2-bin decomposition in the paper by Demontigny et al.
The numbers a(n) are the constituents of the 3-bin decomposition of a natural number. See Example 4.2 and Proposition 4.3 in the Demontigny et al. paper.
Any natural number N can be uniquely expanded as
N = Sum_{i=0..k} d(i)*a(i)
under the requirement d(i)d(i+1) = 0, and d(3i)d(3i+2) = 0 for all i.
Here k is the largest integer such that a(k) < N+1.
(End)

Examples

			(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
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Maple
    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:
  • Mathematica
    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 *)

Formula

a(n) = 4*a(n-3) - a(n-6).
G.f.: ( 1+x+2*x^2-x^3-x^5 ) / ( 1-4*x^3+x^6 ).
a(n) = a(n-1)+a(n-3) if 3 |(n-1), else a(n)=a(n-1)+a(n-2), with n>1.
a(3*n-1) = A001075(n); a(3*n) = A001835(n-1); a(3*n+1) = A001353(n+1).
a(n)^2 = 1+3*a(n-1)^2 if n==2 (mod 3).

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

Views

Author

Keywords

Comments

It appears that every term is a term of A002965. The sequence A245935 arises from A245933 and A245934, in which the limit-reverse of certain sequences is defined, as follows. Suppose that S = (s(0),s(1),s(2),...) is an infinite sequence such that every finite block of consecutive terms occurs infinitely many times in S. (It is assumed that A006337 is such a sequence.) Let B = B(m,k) = (s(m-k),s(m-k+1),...,s(m)) be such a block, where m >= 0 and k >= 0. Let m(1) be the least i > m such that (s(i-k),s(i-k+1),...,s(i)) = B(m,k), and put B(m(1),k+1) = (s(m(1)-k-1),s(m(1)-k),...,s(m(1))). Let m(2) be the least i > m(1) such that (s(i-k-1),s(i-k),...,s(i)) = B(m(1),k+1), and put B(m(2),k+2) = (s(m(2)-k-2),s(m(2)-k-1),...,s(m(2))). Continuing in this manner gives a sequence of blocks B(m(n),k+n). Let B'(n) = reverse(B(m(n),k+n)), so that for n >= 1, B'(n) comes from B'(n-1) by suffixing a single term; thus the limit of B'(n) is defined; we call it the "limit-reverse of S with initial block B(m,k)", denoted by S*(m,k), or simply S*. (Since Beatty sequences are usually written with offset 1, the above definition is adapted accordingly, so that s(n) = A006337(n+1) for n >= 0.)
...
The sequence (m(i)), where m(0) = 1, is the "index sequence for limit-reversing S with initial block B(m,k)" or simply the index sequence for S*, as in A245934.

Examples

			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,...).
		

Crossrefs

Programs

  • Mathematica
    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

Views

Author

Raphie Frank, Dec 30 2015

Keywords

Comments

a(n)/A266504(n) converges to sqrt(2).
Alternatively, bisection of A266506.
Alternatively, A135532(n) and A048655(n) interlaced.
Alternatively, A255236(n-1), A054490(n), A038762(n) and A101386(n) interlaced.
Let b(n) = (a(n) - (a(n) mod 2))/2, that is b(n) = {-1, 0, 1, 2, 2, 5, 6, 13, 15, 32, 37, 78, 90, ...}. Then:
A006451(n) = {b(4n+0) U b(4n+1)} gives n in N such that triangular(n) + 1 is square;
A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that triangular(n) follows form n^2 + n + 1 (twice a triangular number + 1).

Crossrefs

Programs

  • Magma
    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
    
  • Maple
    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
  • Mathematica
    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 *)
  • PARI
    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

Formula

G.f.: (-1 + 3*x)*(1 + x)^2/(1 - 2*x^2 - x^4).
a(n) = (-(1+sqrt(2))^floor(n/2)*(-1)^n - sqrt(8)*(1-sqrt(2))^floor(n/2) - (1-sqrt(2))^floor(n/2)*(-1)^n + sqrt(8)*(1+sqrt(2))^floor(n/2))/2.
a(n) = 3*(((1+sqrt(2))^floor(n/2)-(1-sqrt(2))^floor(n/2))/sqrt(8)) - (-1)^n*(((1+sqrt(2))^(floor(n/2)-(-1)^n)-(1-sqrt(2))^(floor(n/2)-(-1)^n))/sqrt(8)).
a(n) = (3*A000129(floor(n/2)) - A000129(n-(-1)^n)), where A000129 gives the Pell numbers.
a(n) = sqrt(2*A266504(n)^2 - 7*(-1)^A266504(n))*sgn(2*n-1), where A266504 gives all x in N such that 2*x^2 - 7*(-1)^x = y^2. This sequence gives associated y values.
a(2n) = (-(1 + sqrt(2))^n - sqrt(8)*(1 - sqrt(2))^n - (1 - sqrt(2))^n + sqrt(8)*(1 + sqrt(2))^n)/2 = a(2n) = A135532(n).
a(2n) = 3*(((1+sqrt(2))^n-(1-sqrt(2))^n)/sqrt(8)) - (((1+sqrt(2))^(n-1)-(1-sqrt(2))^(n-1))/sqrt(8)) = A135532(n).
a(2n+1) = (+(1 + sqrt(2))^n - sqrt(8)*(1 - sqrt(2))^n + (1 - sqrt(2))^n + sqrt(8)*(1 + sqrt(2))^n)/2 = a(2n + 1) = A048655(n).
a(2n+1) = 3*(((1+sqrt(2))^n-(1-sqrt(2))^n)/sqrt(8)) + (((1+sqrt(2))^(n+1)-(1-sqrt(2))^(n+1))/sqrt(8)) = A048655(n).
a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A255236(n-1).
a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A054490(n).
a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038762(n).
a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A101386(n).
(sqrt(2*(a(2n + 1) )^2 + 14*(-1)^floor(n/2)))/2 = A266504(n).
(a(2n + 1) + a(2n))/8 = A000129(n), where A000129 gives the Pell numbers.
a(2n + 1) - a(2n) = A002203(n), where A002203 gives the companion Pell numbers.
(a(2n + 2) + a(2n + 1))/2 = A000129(n+2).
(a(2n + 2) - a(2n + 1))/2 = A000129(n-1).

A114620 2*A084158 (twice Pell triangles).

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

Views

Author

Creighton Dement, Feb 17 2006

Keywords

Comments

Cross-referenced sequences A116484, A001109, A108475, A090390 are also generated by A*B given in the following FAMP code.
Floretion Algebra Multiplication Program, FAMP Code: 1jesleftseq[A*B] with A = - .5'i + .5'j - .5i' + .5j' + 'kk' - .5'ik' - .5'jk' - .5'ki' - .5'kj' and B = - .5'j + .5'k - .5j' + .5k' - 'ii' - .5'ij' - .5'ik' - .5'ji' - .5'ki'
Related to the reciprocals of the differences between successive convergents of the continued fraction of sqrt(2) (i.e., 1, 2, -10, 60, -348, 2030, -11830, 68952, ...). 1/1 + 1/2 - 1/10 + 1/60 - 1/348 + 1/2030 + ... = sqrt(2). 2, 10, 60, ... are products of the denominators of two successive convergents of sqrt(2) (e.g., 11830 = 70*169, cf. A000129 (Pell numbers)). - Gerald McGarvey, Feb 28 2006
a(n) is half of the even leg (b(n)) of the ordered Pythagorean triple (x(n), y(n)=x(n)+1, z(n)). In fact b(n) = x(n) + (1-(-1)^n)/2: x(0)=0, b(0)=0, a(0)=0; x(1)=3, b(1)=4, a(1)=2. - George F. Johnson, Aug 13 2012
Given a square shape composed of A001110(n+1) elements, thinking of it graphically as a sum of layers, each layer having an odd number of elements (all layers together being a sum of consecutive odd numbers), a(n) is the number of last layers that we have to subtract from the square to get a square of squares that is made of A002965(2*(n+1))^4 elements. - Daniel Poveda Parrilla, Jul 17 2016
Also numbers m such that 8*m^2 - 4*m + 1 or 8*m^2 + 4*m + 1 is a perfect square (square roots are then A001653). - Lamine Ngom, Jul 25 2023

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

G.f.: 2*x/((x+1)*(x^2-6*x+1)).
From George F. Johnson, Aug 13 2012: (Start)
a(n) = ((sqrt(2) + 1)^(2*n+1) - (sqrt(2) - 1)^(2*n+1) - 2*(-1)^n)/8. - corrected by Ilya Gutkovskiy, Jul 18 2016
4*a(n)*(2*a(n) + (-1)^n) + 1 = A000129(2*n+1)^2 is a perfect square.
For n >= 0, a(n+1) = 3*a(n) + (-1)^n + sqrt(4*a(n)*(2*a(n) + (-1)^n) + 1).
For n > 0, a(n-1) = 3*a(n) + (-1)^n - sqrt(4*a(n)*(2*a(n) + (-1)^n) + 1).
a(n+1) = 6*a(n) - a(n-1) + 2*(-1)^n.
a(n+1) = 5*a(n) + 5*a(n-1) - a(n-2).
For n > 0, a(n+1)*a(n-1) = a(n)*(a(n) + 2*(-1)^n).
a(n) = A046729(n)/2. (End)
a(n) = A000129(n)*A000129(n+1). - Philippe Deléham, Apr 10 2013
a(n) = A002965(2*(n+1))*(A002965(2*(n+1)+1) - A002965(2*(n+1))). - Daniel Poveda Parrilla, 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

Views

Author

Vincenzo Librandi, Jan 19 2009

Keywords

Comments

Sequence of x: A078057(n); sequence of y: A000129(n). - R. J. Mathar, Feb 19 2009
List of pairs (a, b) such that (a, b*sqrt(2)) = (1 + sqrt(2))^n. In the commutative ring Z[sqrt(2)], the set { +/- (1 + sqrt(2))^n} is a multiplicative group. - Michel Lagneau, Nov 27 2015
The fractions a(2*n-1)/a(2*n) are successive convergents of the simple continued fraction of sqrt(2). - Alexander Fraebel, Sep 03 2020

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a155046 n = a155046_list !! n
    a155046_list = concat $ transpose [tail a001333_list, tail a000129_list]
    -- Reinhard Zumkeller, Jan 01 2014
    
  • Mathematica
    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 *)
  • PARI
    Vec(x*(1+x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Michel Marcus, Nov 28 2015

Formula

a(n) = 2*a(n-2) + a(n-4) for n > 4. - R. J. Mathar, Feb 19 2009
a(2k+1)^2 - 2*a(2k+2)^2 = +-1. - Vincenzo Librandi, Mar 14 2012
G.f.: x*(1+x+x^2)/(1-2*x^2-x^4). - Bruno Berselli, Mar 14 2012

Extensions

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

Views

Author

Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009

Keywords

Comments

This sequence is the case k=3 of a family of sequences with recurrences a(2*n+1) = a(2*n) + a(2*n-1), a(2*n+2) = k*a(2*n-1) + a(2*n), a(1)=0, a(2)=1. Values of k, for k >= 0, are given by A057979 (k=0), A158780 (k=1), A002965 (k=2), this sequence (k=3). See "Family of sequences for k" link for other connected sequences.
It seems that the ratio of two successive numbers with even, or two successive numbers with odd, indices approaches sqrt(k) for these sequences as n-> infinity.
This algorithm can be found in a historical figure named "Villardsche Figur" of the 13th century. There you can see a geometrical interpretation.

Crossrefs

Programs

  • Magma
    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
    
  • Mathematica
    LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
  • SageMath
    @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

Formula

a(n) = 2*a(n-2) + 2*a(n-4).
a(2*n+1) = A002605(n).
a(2*n) = A026150(n-1).

Extensions

Edited by R. J. Mathar, May 14 2009
Previous Showing 11-20 of 27 results. Next