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-3 of 3 results.

A104862 First differences of A014292.

Original entry on oeis.org

0, 1, 1, 1, 1, 0, -2, -5, -9, -13, -15, -12, 0, 25, 65, 117, 169, 196, 158, 3, -321, -841, -1519, -2200, -2560, -2079, -79, 4121, 10881, 19720, 28638, 33435, 27351, 1547, -52895, -140772, -256000, -372775, -436655, -359763, -26871
Offset: 0

Views

Author

Gerald McGarvey, Apr 24 2005

Keywords

Comments

Real part of the sequence of complex numbers defined by c(n) = c(n-1) + i*c(n-2) for n > 1, c(0) = 1, c(1) = 1.
a(n) = real part of the sequence b of quaternions defined by b(0)=1, b(1)=1, b(n) = b(n-1) + b(n-2)*(0,s,s,s) where s = 1/sqrt(3).

Crossrefs

Programs

  • Mathematica
    Differences@ LinearRecurrence[{2, -1, 0, -1}, {0, 0, 1, 2}, 42] (* Michael De Vlieger, Mar 19 2021 *)
  • Python
    a = [0]*1000
    a[1]=1
    for n in range(1,55):
        print(a[n-1], end=", ")
        s=sum(a[k] for k in range(n-2))
        a[n+1] = a[n]-s
    # from Alex Ratushnyak, May 03 2012

Formula

G.f.: Re(1/(1-x-ix^2)) = (1-x)/(1-2x+x^2+x^4). - Paul Barry, Apr 25 2005
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*cos(Pi*k/2). - Paul Barry, Apr 25 2005
a(0)=0, a(1)=1, a(n+1) = a(n) - Sum_{k=0..n-3} a(k). - Alex Ratushnyak, May 03 2012

A106201 Expansion of Re(x/(1-x-2*i*x^2)), i=sqrt(-1).

Original entry on oeis.org

0, 1, 1, 1, 1, -3, -11, -23, -39, -43, -3, 129, 417, 877, 1349, 1305, -407, -5627, -16243, -32079, -46287, -37987, 35285, 236873, 623609, 1162293, 1559837, 1009889, -2034495, -9728051, -23660955, -41633415, -51467895, -22390171, 101331373, 391586577, 887713361, 1473400829, 1653762805, 267778473, -4669059303, -15499500395
Offset: 0

Views

Author

Paul Barry, Apr 25 2005

Keywords

Comments

Imaginary part is A106202.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,-1,0,-4},{0,1,1,1},50] (* Harvey P. Dale, May 22 2020 *)

Formula

G.f.: x*(1-x)/(1-2*x+x^2+4*x^4).
a(n) = sum(k=0..floor((n-1)/2), C(n-k-1, k)*2^k*cos(pi*k/2) ).

A106202 Expansion of Im(x/(1 - x - 2*i*x^2)), i=sqrt(-1).

Original entry on oeis.org

0, 0, 0, 2, 4, 6, 8, 2, -20, -66, -144, -230, -236, 22, 856, 2610, 5308, 7918, 7104, -4150, -36636, -100794, -193368, -269342, -198772, 274974, 1522192, 3846778, 6966452, 8986230, 4917240, -14538862, -61860772, -145127602, -248063392, -292843734, -90180988, 692992166, 2468418888, 5415220546, 8722746156, 9258303102
Offset: 0

Views

Author

Paul Barry, Apr 25 2005

Keywords

Comments

Real part is A106201.
For n>=2, a(n) equals -1 times the imaginary part of the determinant of the (n-1) X (n-1) matrix with i's along the superdiagonal (i is the imaginary unit), 2's along the subdiagonal, 1's along the main diagonal, and 0's everywhere else (see Mathematica code below). - John M. Campbell, Jun 04 2011

Crossrefs

Programs

  • Mathematica
    Table[-Im[Det[Array[KroneckerDelta[#1 + 1, #2]*I &, {n - 1, n - 1}] + Array[KroneckerDelta[#1 - 1, #2]*2 &, {n - 1, n - 1}] + IdentityMatrix[n - 1]]], {n, 2, 40}] (* John M. Campbell, Jun 04 2011 *)
  • PARI
    concat(vector(3), Vec(2*x^3/(1-2*x+x^2+4*x^4) + O(x^50))) \\ Michel Marcus, Jan 03 2016

Formula

G.f.: 2*x^3/(1-2*x+x^2+4*x^4).
a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k)*2^k*sin(Pi*k/2).
Showing 1-3 of 3 results.