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.

A099504 Expansion of 1/(1-5*x+x^3).

Original entry on oeis.org

1, 5, 25, 124, 615, 3050, 15126, 75015, 372025, 1844999, 9149980, 45377875, 225044376, 1116071900, 5534981625, 27449863749, 136133246845, 675131252600, 3348206399251, 16604898749410, 82349362494450, 408398606072999
Offset: 0

Views

Author

Paul Barry, Oct 20 2004

Keywords

Comments

A transform of A000351 under the mapping g(x)->(1/(1+x^3))g(x/(1+x^3)).

Crossrefs

Programs

  • Magma
    [n le 3 select 5^(n-1) else 5*Self(n-1) -Self(n-3): n in [1..30]]; // G. C. Greubel, Aug 03 2023
    
  • Maple
    A099504:=n->sum(binomial(n-2*i, i)*(-1)^i*5^(n-3*i), i=0..floor(n/3)); seq(A099504(n), n=0..30); # Wesley Ivan Hurt, Dec 03 2013
  • Mathematica
    Table[Sum[Binomial[n-2*i,i]*(-1)^i*5^(n-3*i), {i,0,Floor[n/3]}], {n,0, 30}] (* Wesley Ivan Hurt, Dec 03 2013 *)
    LinearRecurrence[{5,0,-1}, {1,5,25}, 30] (* G. C. Greubel, Aug 03 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099504
        if (n<3): return 5^n
        else: return 5*a(n-1) - a(n-3)
    [a(n) for n in range(31)] # G. C. Greubel, Aug 03 2023

Formula

a(n) = 5*a(n-1) - a(n-3).
a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k, k)*(-1)^k*5^(n-3*k).

A099505 A transform of the Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 0, 1, -3, -2, -8, -5, -12, -4, -11, 6, -1, 28, 16, 56, 26, 72, 3, 51, -80, -19, -224, -104, -373, -99, -408, 154, -205, 770, 222, 1655, 540, 2367, 24, 2196, -2196, 664, -6440, -1555, -11543, -1750, -14427, 4690, -11340, 22009, -1595, 49534, 7008, 77051, -5264, 85296, -65467, 57874
Offset: 0

Views

Author

Paul Barry, Oct 20 2004

Keywords

Comments

A transform of A000045 under the mapping g(x) -> (1/(1+x^3)) * g(x/(1+x^3)).

Crossrefs

Programs

  • Magma
    I:=[0,1,1,2,1,2]; [n le 6 select I[n] else Self(n-1) +Self(n-2) -2*Self(n-3) +Self(n-4) -Self(n-6): n in [1..65]]; // G. C. Greubel, Aug 03 2023
    
  • Mathematica
    LinearRecurrence[{1,1,-2,1,0,-1}, {0,1,1,2,1,2}, 65] (* G. C. Greubel, Aug 03 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099505
        if (n<6): return (0,1,1,2,1,2)[n]
        else: return a(n-1) +a(n-2) -2*a(n-3) +a(n-4) -a(n-6)
    [a(n) for n in range(71)] # G. C. Greubel, Aug 03 2023

Formula

G.f.: x/(1 - x - x^2 + 2*x^3 - x^4 + x^6).
a(n) = a(n-1) + a(n-2) - 2*a(n-3) + a(n-4) - a(n-6).
a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k, k)*(-1)^k*Fibonacci(n-3*k).

A124806 Number of circular n-letter words over the alphabet {0,1,2,3,4} with adjacent letters differing by at most 2.

Original entry on oeis.org

1, 5, 19, 65, 247, 955, 3733, 14649, 57583, 226505, 891219, 3507047, 13801285, 54313277, 213745019, 841177105, 3310392415, 13027820227, 51270096661, 201769982673, 794052091767, 3124938240153, 12297982928987, 48397879544975
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

Empirical: a(base, n) = a(base-1, n) + A005191(n+1) for base >= 2*floor(n/2) + 1 where base is the number of letters in the alphabet.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-3*x^2-10*x^3+3*x^4+4*x^5)/((1-x-x^2)*(1-4*x+x^3)) )); // G. C. Greubel, Aug 03 2023
    
  • Mathematica
    LinearRecurrence[{5,-3,-5,1,1}, {1,5,19,65,247,955}, 60] (* G. C. Greubel, Aug 03 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A124806
        if (n<6): return (1,5,19,65,247,955)[n]
        else: return 5*a(n-1)-3*a(n-2)-5*a(n-3)+a(n-4)+a(n-5)
    [a(n) for n in range(31)] # G. C. Greubel, Aug 03 2023

Formula

From Colin Barker, Jun 04 2017: (Start)
G.f.: (1 - 3*x^2 - 10*x^3 + 3*x^4 + 4*x^5) / ((1 - x - x^2)*(1 - 4*x + x^3)).
a(n) = 5*a(n-1) - 3*a(n-2) - 5*a(n-3) + a(n-4) + a(n-5) for n>5. (End)
a(n) = -4*[n=0] + LucasL(n-1) + 3*A099503(n) - 8*A099503(n-1). - G. C. Greubel, Aug 03 2023

A052927 Expansion of 1/(1-4*x-x^3).

Original entry on oeis.org

1, 4, 16, 65, 264, 1072, 4353, 17676, 71776, 291457, 1183504, 4805792, 19514625, 79242004, 321773808, 1306609857, 5305681432, 21544499536, 87484608001, 355244113436, 1442520953280, 5857568421121, 23785517797920, 96584592144960, 392195937000961
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

A transform of A000302 under the mapping mapping g(x) -> (1/(1-x^3)) * g(x/(1-x^3)). - Paul Barry, Oct 20 2004
a(n) equals the number of n-length words on {0,1,2,3,4} such that 0 appears only in a run which length is a multiple of 3. - Milan Janjic, Feb 17 2015

Crossrefs

Cf. A099503.

Programs

  • GAP
    a:=[1,4,16];; for n in [4..30] do a[n]:=4*a[n-1]+a[n-3]; od; a; # G. C. Greubel, Oct 17 2019
  • Magma
    I:=[1, 4, 16]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
    
  • Magma
    R:=PowerSeriesRing(Integers(), 25); Coefficients(R!( 1/(1-4*x-x^3))); // Marius A. Burtea, Oct 18 2019
    
  • Maple
    spec:= [S,{S=Sequence(Union(Z,Z,Z,Z,Prod(Z,Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(coeff(series(1/(1-4*x-x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Oct 17 2019
  • Mathematica
    CoefficientList[Series[1/(1-4x-x^3),{x,0,40}],x] (* or *) LinearRecurrence[{4,0,1},{1,4,16},40] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-4*x-x^3)) \\ G. C. Greubel, Oct 17 2019
    
  • Sage
    def A052927_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-4*x-x^3) ).list()
    A052927_list(30) # G. C. Greubel, Oct 17 2019
    

Formula

G.f.: 1/(1-4*x-x^3).
a(n) = 4*a(n-1) + a(n-3), with a(0)=1, a(1)=4, a(2)=16.
a(n) = Sum_{r=RootOf(-1+4*z+z^3)} (1/283)*(64 + 9*r + 24*r^2)*r^(-1-n).
a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k, k)*4^(n-3*k). - Paul Barry, Oct 20 2004
Showing 1-4 of 4 results.