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.

Showing 1-8 of 8 results.

A275830 a(n) = (2*sqrt(7)*sin(Pi/7))^n + (-2*sqrt(7)*sin(2*Pi/7))^n + (-2*sqrt(7)*sin(4*Pi/7))^n.

Original entry on oeis.org

3, -7, 49, -196, 1029, -4802, 24010, -117649, 588245, -2941225, 14823774, -74942413, 380476866, -1936973136, 9886633715, -50563069571, 259029803333, -1328763571296, 6823754590093, -35073821767334, 180407337377834, -928487386730281, 4780794440512601, -24625601552074341, 126883328914736618
Offset: 0

Views

Author

Kai Wang, Aug 11 2016

Keywords

Comments

2*sqrt(7)*sin(Pi/7), -2*sqrt(7)*sin(2*Pi/7) and -2*sqrt(7)*sin(4*Pi/7) are roots of polynomial x^3 + 7*x^2 - 49.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 3, a[1] == -7, a[2] == 49, a[n] == -7 a[n - 1] + 49 a[n - 3]}, a, {n, 0, 30}] (* Bruno Berselli, Aug 11 2016 *)
  • PARI
    Vec((3 + 14*x)/(1 + 7*x - 49*x^3) + O(x^30)) \\ Colin Barker, Aug 30 2016

Formula

G.f.: (3 + 14*x)/(1 + 7*x - 49*x^3). - Bruno Berselli, Aug 11 2016
a(n) = -7*a(n-1) + 49*a(n-3) with n>2, a(0)=3, a(1)=-7, a(2)=49.
a(2*n-1) = 7^n*A215493(n). - Kai Wang, May 25 2017

A275831 a(n) = (sqrt(7)*csc(Pi/7)/2)^n + (-sqrt(7)*csc(2*Pi/7)/2)^n + (-sqrt(7)*csc(4*Pi/7)/2)^n.

Original entry on oeis.org

3, 0, 14, 21, 98, 245, 833, 2401, 7546, 22638, 69629, 211288, 645869, 1966419, 6000099, 18286016, 55765626, 170002805, 518361494, 1580379017, 4818550093, 14691183577, 44792503770, 136568135690, 416385811429, 1269524476220, 3870677629833, 11801372013543, 35981414742371, 109704347503632, 334479507291398
Offset: 0

Views

Author

Kai Wang, Aug 11 2016

Keywords

Comments

(sqrt(7)*csc(Pi/7)/2), (-sqrt(7)*csc(2*Pi/7)/2) and (-sqrt(7)*csc(4*Pi/7)/2) are the roots of the polynomial x^3 - 7*x - 7. - Corrected by Colin Barker, Aug 12 2016

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 3, a[1] == 0, a[2] == 14, a[n] == 7 a[n - 2] + 7 a[n - 3]}, a, {n, 0, 30}] (* Bruno Berselli, Aug 11 2016 *)
    LinearRecurrence[{0,7,7},{3,0,14},40] (* Harvey P. Dale, Jan 01 2022 *)
  • PARI
    Vec((3-7*x^2)/(1-7*x^2-7*x^3) + O(x^30)) \\ Colin Barker, Aug 12 2016

Formula

G.f.: (3 - 7*x^2)/(1 - 7*x^2 - 7*x^3). - Bruno Berselli, Aug 11 2016
a(n) = 7*a(n-2) + 7*a(n-3) with n>2, a(0)=3, a(1)=0, a(2)=14.

Extensions

Name and comment corrected by Colin Barker, Aug 12 2016

A293312 Rectangular array read by antidiagonals: A(n,k) = tr((M_n)^k), k >= 0, where M_n is the n X n matrix M_1 = {{1}}, M_n = {{0,...,0,1},{0,...,0,1,1},...,{0,1,...,1},{1,...,1}}, n > 1, and tr(.) is the trace.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 3, 2, 4, 1, 4, 6, 2, 5, 1, 7, 11, 10, 3, 6, 1, 11, 26, 23, 15, 3, 7, 1, 18, 57, 70, 42, 21, 4, 8, 1, 29, 129, 197, 155, 69, 28, 4, 9, 1, 47, 289, 571, 533, 301, 106, 36, 5, 10, 1, 76, 650, 1640, 1884, 1223, 532, 154, 45, 5, 11
Offset: 1

Views

Author

L. Edson Jeffery, Oct 10 2017

Keywords

Comments

Conjecture: For all n >= 1, for all k >= 2, A(n, k) = A293311(k, n); i.e., A(n, k) = number of magic labelings of the graph LOOP X C_k with magic sum n - 1.

Examples

			Array begins:
.   1 1  1   1    1     1      1       1       1        1         1
.   2 1  3   4    7    11     18      29      47       76       123
.   3 2  6  11   26    57    129     289     650     1460      3281
.   4 2 10  23   70   197    571    1640    4726    13604     39175
.   5 3 15  42  155   533   1884    6604   23219    81555    286555
.   6 3 21  69  301  1223   5103   21122   87677   363606   1508401
.   7 4 28 106  532  2494  11998   57271  274132  1310974   6271378
.   8 4 36 154  876  4654  25362  137155  743724  4029310  21836366
.   9 5 45 215 1365  8105  49347  298184 1806597 10936124  66220705
.  10 5 55 290 2035 13355  89848  599954 4016683 26868719 179784715
.  11 6 66 381 2926 21031 154935 1132942 8306078 60843972 445824731
.  ...
		

Crossrefs

Cf. A293311.
Cf. A000012, A000032, A274975, A188128, A189237 (rows 1..5).
Cf. A000027, A000217, A019298, A006325, A244497, A244879, A244873, A244880, A293310, A293309 (columns k = 0,2..10 (conjectured)).

Programs

  • Mathematica
    s[0, x_] := 1; s[1, x_] := x; s[k_, x_] := x*s[k - 1, x] - s[k - 2, x]; c[n_, j_] := 2 (-1)^(j - 1) Cos[j*Pi/(2 n + 1)]; a[n_, k_] := Round[Sum[s[n - 1, c[n, j]]^(k), {j, n}]];
    (* Array: *)
    Grid[Table[a[n, k], {n, 11}, {k, 0, 10}]]
    (* Array antidiagonals flattened (gives this sequence): *)
    Flatten[Table[a[n, k - n], {k, 11}, {n, k}]]

Formula

Let S(0, x) = 1, S(1, x) = x, S(k, x) = x*S(k - 1, x) - S(k - 2, x) (the S-polynomials of Wolfdieter Lang) and c(n, j) = 2*(-1)^(j - 1)*cos(j*Pi/(2*n + 1)). Then A(n, k) = Sum_{j=1..n} S(n - 1, c(n, j))^(k), n >= 1, k >= 0.

A320918 Sum of n-th powers of the roots of x^3 + 9*x^2 + 20*x - 1.

Original entry on oeis.org

3, -9, 41, -186, 845, -3844, 17510, -79865, 364741, -1667859, 7636046, -35002493, 160633658, -738017016, 3394477491, -15629323441, 72036344133, -332346150886, 1534759151873, -7093873005004, 32817327856690, -151943731458257, 704053152985509, -3264786419847751
Offset: 0

Views

Author

Kai Wang, Oct 24 2018

Keywords

Comments

In general, for integer h, k let
X = (sin^(h+k)(2*Pi/7))/(sin^(h)(4*Pi/7)*sin^(k)(8*Pi/7)),
Y = (sin^(h+k)(4*Pi/7))/(sin^(h)(8*Pi/7)*sin^(k)(2*Pi/7)),
Z = (sin^(h+k)(8*Pi/7))/(sin^(h)(2*Pi/7)*sin^(k)(4*Pi/7)).
then X, Y, Z are the roots of a monic equation
t^3 + a*t^2 + b*t + c = 0
where a, b, c are integers and c = 1 or -1.
Then X^n + Y^n + Z^n, n = 0, 1, 2, ... is an integer sequence.
Instances of such sequences with (h,k) values:
(-3,0), (0,3), (3,-3): gives A274663;
(-3,3), (0,-3): give A274664;
(-2,0), (0,2), (2,-2): give A198636;
(-2,-3), (-1,-2), (2,-1), (3,-1): give A274032;
(-1,-1), (-1,2): give A215076;
(-1,0), (0,1), (1,-1): give A094648;
(-1,1), (0,-1), (1,0): give A274975;
(1,1), (-2,1), (1,-2): give A274220;
(1,2), (-3,1), (2,-3): give A274075;
(1,3): this sequence.

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; if n < 3 then [3, -9, 41][n+1] else
    -9*a(n-1) - 20*a(n-2) + a(n-3) fi end: seq(a(n), n=0..32); # Peter Luschny, Oct 25 2018
  • Mathematica
    CoefficientList[Series[(3 + 18*x + 20*x^2) / (1 + 9*x + 20*x^2 - x^3) , {x, 0, 50}], x] (* Amiram Eldar, Dec 09 2018 *)
    LinearRecurrence[{-9,-20,1},{3,-9,41},30] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    polsym(x^3 + 9*x^2 + 20*x - 1, 25) \\ Joerg Arndt, Oct 24 2018
    
  • PARI
    Vec((3 + 18*x + 20*x^2) / (1 + 9*x + 20*x^2 - x^3) + O(x^30)) \\ Colin Barker, Dec 09 2018

Formula

a(n) = ((sin^4(2*Pi/7))/(sin(4*Pi/7)*sin^3(8*Pi/7)))^n
+ ((sin^4(4*Pi/7))/(sin(8*Pi/7)*sin^3(2*Pi/7)))^n
+ ((sin^4(8*Pi/7))/(sin(2*Pi/7)*sin^3(4*Pi/7)))^n.
a(n) = -9*a(n-1) - 20*a(n-2) + a(n-3) for n>2.
G.f.: (3 + 18*x + 20*x^2) / (1 + 9*x + 20*x^2 - x^3). - Colin Barker, Dec 09 2018

A321173 a(n) = -2*a(n-1) + a(n-2) + a(n-3), a(0) = -1, a(1) = 3, a(2) = -9.

Original entry on oeis.org

-1, 3, -9, 20, -46, 103, -232, 521, -1171, 2631, -5912, 13284, -29849, 67070, -150705, 338631, -760897, 1709720, -3841706, 8632235, -19396456, 43583441, -97931103, 220049191, -494446044, 1111010176, -2496417205, 5609398542, -12604204113, 28321389563, -63637584697
Offset: 0

Views

Author

Kai Wang, Jan 10 2019

Keywords

Comments

Let {X,Y,Z} be the roots of the cubic equation t^3 + at^2 + bt + c = 0 where {a, b, c} are integers.
Let {u, v, w} be three numbers such that {u + v + w, u*X + v*Y + w*Z, u*X^2 + v*Y^2 + w*Z^2} are integers.
Then {p(n) = u*X^n + v*Y^n + w*Z^n | n = 0, 1, 2, ...} is an integer sequence with the recurrence relation: p(n) = -a*p(n-1) - b*p(n-2) - c*p(n-3).
Let k = Pi/7.
This sequence has (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(4k), 2*cos(8k), 2*cos(2k)).
A033304, A274975: (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(2k), 2*cos(4k), 2*cos(8k)).
A321174 : (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(8k), 2*cos(2k), 2*cos(4k)).
X = sin(2k)/sin(4k), Y = sin(4k)/sin(8k), Z = sin(8k)/sin(2k).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-2,1,1},{-1,3,-9},50] (* Stefano Spezia, Jan 11 2019 *)
  • PARI
    Vec(-(1 - x + 2*x^2) / (1 + 2*x - x^2 - x^3) + O(x^30)) \\ Colin Barker, Jan 11 2019

Formula

G.f.: -(1 - x + 2*x^2) / (1 + 2*x - x^2 - x^3). - Colin Barker, Jan 11 2019

A321174 a(n) = -2*a(n-1) + a(n-2) + a(n-3), a(0) = -1, a(1) = -4, a(2) = 5.

Original entry on oeis.org

-1, -4, 5, -15, 31, -72, 160, -361, 810, -1821, 4091, -9193, 20656, -46414, 104291, -234340, 526557, -1183163, 2658543, -5973692, 13422764, -30160677, 67770426, -152278765, 342167279, -768842897, 1727574308, -3881824234, 8722379879, -19599009684, 44038575013
Offset: 0

Views

Author

Kai Wang, Jan 10 2019

Keywords

Comments

Let {X,Y,Z} be the roots of the cubic equation t^3 + at^2 + bt + c = 0 where {a, b, c} are integers.
Let {u, v, w} be three numbers such that {u + v + w, u*X + v*Y + w*Z, u*X^2 + v*Y^2 + w*Z^2} are integers.
Then {p(n) = u*X^n + v*Y^n + w*Z^n | n = 0, 1, 2, ...} is an integer sequence with the recurrence relation: p(n) = -a*p(n-1) - b*p(n-2) - c*p(n-3).
Let k = Pi/7.
This sequence has (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(8k), 2*cos(2k), 2*cos(4k)).
A033304, A274975: (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(2k), 2*cos(4k), 2*cos(8k)).
A321173 : (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(4k), 2*cos(8k), 2*cos(2k)).
X = sin(2k)/sin(4k), Y = sin(4k)/sin(8k), Z = sin(8k)/sin(2k).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-2,1,1},{-1,-4,5},50] (* Stefano Spezia, Jan 11 2019 *)
  • PARI
    Vec(-(1 + 6*x + 2*x^2) / (1 + 2*x - x^2 - x^3) + O(x^30)) \\ Colin Barker, Jan 11 2019

Formula

G.f.: -(1 + 6*x + 2*x^2) / (1 + 2*x - x^2 - x^3). - Colin Barker, Jan 11 2019

A287396 a(n) = (7*(csc(2*Pi/7))^2)^n + (7*(csc(4*Pi/7))^2)^n + (7*(csc(8*Pi/7))^2)^n.

Original entry on oeis.org

3, 56, 1568, 53312, 1931776, 71300096, 2645479424, 98305622016, 3654656065536, 135885355483136, 5052615982317568, 187873377732526080, 6985794697679601664, 259756778648305139712, 9658687473893481906176, 359144636249686988029952, 13354285908291066433372160
Offset: 0

Views

Author

Kai Wang, May 24 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{56,-784,3136},{3,56,1568},30] (* Harvey P. Dale, Aug 08 2017 *)
  • PARI
    Vec((3 - 28*x)*(1 - 28*x) / (1 - 56*x + 784*x^2 - 3136*x^3) + O(x^30)) \\ Colin Barker, May 25 2017
    
  • PARI
    polsym(x^3 - 56*x^2 + 784* x - 3136, 20) \\ Joerg Arndt, May 26 2017

Formula

a(n) = x1^n + x2^n + x3^n, where x1, x2, x3 are the roots of x^3 - 56*x^2 + 784* x - 3136, x1 = 7*(csc(2*Pi/7))^2, x2 = 7*(csc(4*Pi/7))^2, x3 = 7*(csc(8*Pi/7))^2.
a(n) = 56*a(n-1) - 784*a(n-2) + 3136*a(n-3) for n>2, a(0) = 3, a(1) = 56, a(2) = 1568.
G.f.: (3 - 28*x)*(1 - 28*x) / (1 - 56*x + 784*x^2 - 3136*x^3). - Colin Barker, May 25 2017

A287405 a(n) = (7*(cot(1*Pi/7))^2)^n + (7*(cot(2*Pi/7))^2)^n + (7*(cot(4*Pi/7))^2)^n.

Original entry on oeis.org

3, 35, 931, 27587, 830403, 25054435, 756187747, 22824258947, 688917131651, 20793986742179, 627637106311971, 18944339609269571, 571808137046942019, 17259221092289630307, 520945214725090792931, 15723995613526902256387, 474606601742375424297731
Offset: 0

Views

Author

Kai Wang, May 24 2017

Keywords

Comments

a(n) = x1^n + x2^n + x3^n, where x1, x2, x3 are the roots of x^3 - 35*x^2 + 147*x - 49, x1 = 7*(cot(1*Pi/7))^2, x2 = 7*(cot(2*Pi/7))^2, x3 = 7*(cot(4*Pi/7))^2.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{35,-147,49},{3,35,931},30] (* Harvey P. Dale, Mar 15 2018 *)
  • PARI
    Vec((3 - 7*x)*(1 - 21*x) / (1 - 35*x + 147*x^2 - 49*x^3) + O(x^30)) \\ Colin Barker, May 26 2017
    
  • PARI
    polsym(x^3 - 35*x^2 + 147*x - 49, 20) \\ Joerg Arndt, May 26 2017

Formula

a(n) = 35*a(n-1) - 147*a(n-2) + 49*a(n-3), a(0) = 3, a(1) = 35, a(2) = 931.
Bisection of A215575: a(n) = A215575(2*n).
G.f.: (3 - 7*x)*(1 - 21*x) / (1 - 35*x + 147*x^2 - 49*x^3). - Colin Barker, May 26 2017
Showing 1-8 of 8 results.