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

A159284 Expansion of x*(1+x)/(1-x^2-2*x^3).

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 5, 9, 11, 19, 29, 41, 67, 99, 149, 233, 347, 531, 813, 1225, 1875, 2851, 4325, 6601, 10027, 15251, 23229, 35305, 53731, 81763, 124341, 189225, 287867, 437907, 666317, 1013641, 1542131, 2346275, 3569413, 5430537
Offset: 0

Views

Author

Creighton Dement, Apr 08 2009

Keywords

Comments

a(n) is the number of composition of n+1 into parts congruent to 0 or 2 modulo 3. - Joerg Arndt, Apr 21 2025

Crossrefs

Programs

  • Magma
    I:=[0,1,1]; [n le 3 select I[n] else Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jun 27 2018
  • Mathematica
    CoefficientList[Series[x (1+x)/(1-x^2-2x^3),{x,0,50}],x] (* or *) LinearRecurrence[ {0,1,2},{0,1,1},50] (* Harvey P. Dale, Jul 16 2013 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 2,1,0]^n*[0;1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

a(n) = abs(A078028(n-1)). - R. J. Mathar, Jul 05 2012
a(n) = a(n-2) + 2*a(n-3), a(0)=0, a(1) = a(2) =1. - G. C. Greubel, Apr 30 2017
a(n) = A052947(n-1)+A052947(n-2). - R. J. Mathar, Mar 23 2023

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A076118 a(n) = Sum_{k=n/2..n} k * (-1)^(n-k) * C(k,n-k).

Original entry on oeis.org

0, 1, 1, -1, -3, -2, 2, 5, 3, -3, -7, -4, 4, 9, 5, -5, -11, -6, 6, 13, 7, -7, -15, -8, 8, 17, 9, -9, -19, -10, 10, 21, 11, -11, -23, -12, 12, 25, 13, -13, -27, -14, 14, 29, 15, -15, -31, -16, 16, 33, 17, -17, -35, -18, 18, 37, 19, -19, -39, -20, 20, 41, 21, -21, -43, -22, 22, 45, 23, -23, -47, -24, 24, 49, 25, -25, -51, -26, 26
Offset: 0

Views

Author

Henry Bottomley, Oct 31 2002

Keywords

Comments

Piecewise linear depending on residue modulo 6. Might be described as an inverse Catalan transform of the nonnegative integers.
Number of compositions of n consisting of at most two parts, all congruent to {0,2} mod 3 (offset 1). - Vladeta Jovovic, Mar 10 2005

Examples

			a(10) = -5*1 + 6*15 - 7*35 + 8*28 - 9*9 + 10*1 = -5 + 90 -245 + 224 - 81 + 10 = -7.
		

Crossrefs

Cf. A003881, A038608, A078028, A099254 (partial sums).
See A151842 for a version without signs.

Programs

  • Maple
    A076118:=n->add(k*(-1)^(n-k)*binomial(k,n-k), k=floor(n/2)..n); seq(A076118(n), n=0..50); # Wesley Ivan Hurt, May 08 2014
    f:= gfun:-rectoproc({a(n+4) = 2*a(n+3)-3*a(n+2)+2*a(n+1)-a(n), a(0)=0,a(1)=1,a(2)=1,a(3)=-1}, a(n), remember):
    map(f, [$0..100]); # Robert Israel, Aug 07 2015
  • Mathematica
    Table[Sum[k*(-1)^(n - k)*Binomial[k, n - k], {k, Floor[n/2], n}], {n,
    0, 50}] (* Wesley Ivan Hurt, May 08 2014 *)
  • PARI
    {a(n)=local(k=n%3); n=n\3; (-1)^n*((k>0)+n+(k==1)*n)} /* Michael Somos, Jul 14 2006 */
    
  • PARI
    {a(n)=if(n<0, n=-1-n); polcoeff(x*(1-x)/(1-x+x^2)^2+x*O(x^n),n)} /* Michael Somos, Jul 14 2006 */

Formula

a(3n) = -a(3n-1) = A038608(n).
a(n) = ( 2n*sin((n+1/2)*Pi/3) + sin(n*Pi/3)/sin(Pi/3) )/3.
a(3n) = n*(-1)^n; a(3n+1) = (2n+1)*(-1)^n; a(3n+2) = (n+1)*(-1)^n.
a(n) = Sum{k=0..floor(n/2)} binomial(n-k, k)(-1)^k*(n-k). - Paul Barry, Nov 12 2004
From Michael Somos, Jul 14 2006: (Start)
Euler transform of length 6 sequence [ 1, -2, -2, 0, 0, 2].
G.f.: x(1-x)/(1-x+x^2)^2 = x*(1-x^2)^2*(1-x^3)^2/((1-x)*(1-x^6)^2).
a(-1-n)=a(n). (End)
a(n+4) = 2*a(n+3)-3*a(n+2)+2*a(n+1)-a(n). - Robert Israel, Aug 07 2015
a(n) = A099254(n-1)-A099254(n-2). - R. J. Mathar, Apr 01 2018
Sum_{n>=1} 1/a(n) = Pi/4 (A003881). - Amiram Eldar, May 10 2025

A107854 G.f. x*(x^2+1)*(x^3-x-1)/((2*x^3+x^2-1)*(x^4+1)).

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 5, 8, 11, 19, 29, 42, 67, 99, 149, 232, 347, 531, 813, 1226, 1875, 2851, 4325, 6600, 10027, 15251, 23229, 35306, 53731, 81763, 124341, 189224, 287867, 437907, 666317, 1013642, 1542131, 2346275, 3569413, 5430536, 8261963, 12569363
Offset: 0

Views

Author

Creighton Dement, May 25 2005

Keywords

Comments

The sequence A078028 is given by 1em[I* ]forzapseq and is from the same "batch" (i.e., corresponding to the same floretion and symmetry settings) as A107849, A107850, A107851, A107852, A107853 and (a(n)).
Floretion Algebra Multiplication Program, FAMP Code: 1dia[I]forzapseq[(.5i' + .5j' + .5'ki' + .5'kj')*(.5'i + .5'j + .5'ik' + .5'jk')], 1vesforzap = A000004

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x(x^2+1)(x^3-x-1)/((2x^3+x^2-1)(x^4+1)),{x,0,50}],x] (* or *) LinearRecurrence[{0,1,2,-1,0,1,2},{0,1,1,2,3,3,5},50] (* Harvey P. Dale, Jun 21 2022 *)
  • PARI
    a(n)=([0,1,0,0,0,0,0; 0,0,1,0,0,0,0; 0,0,0,1,0,0,0; 0,0,0,0,1,0,0; 0,0,0,0,0,1,0; 0,0,0,0,0,0,1; 2,1,0,-1,2,1,0]^n*[0;1;1;2;3;3;5])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = A159284(n) + A014017(n+5).

A134270 a(n)=2a(n-1)+a(n-2)-4a(n-4).

Original entry on oeis.org

1, 1, 3, 7, 13, 29, 59, 119, 245, 493, 995, 2007, 4029, 8093, 16235, 32535, 65189, 130541, 261331, 523063, 1046701, 2094301, 4189979, 8382007, 16767189, 33539181, 67085635, 134182423, 268381725, 536789149, 1073617483, 2147294423, 4294679429, 8589496685
Offset: 0

Views

Author

Paul Curtz, Jan 30 2008

Keywords

Programs

  • Mathematica
    LinearRecurrence[{2,1,0,-4},{1,1,3,7},40] (* Harvey P. Dale, Jan 16 2013 *)

Formula

O.g.f.: (1+x)*x/(2*x^3+x^2-1)-1/(2*x-1) . a(n) = -|A078028(n-1)| + 2^n . - R. J. Mathar, Feb 01 2008

Extensions

More terms from Harvey P. Dale, Jan 16 2013
Showing 1-4 of 4 results.