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.

A113405 Expansion of x^3/(1 - 2*x + x^3 - 2*x^4) = x^3/( (1-2*x)*(1+x)*(1-x+x^2) ).

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 7, 14, 28, 57, 114, 228, 455, 910, 1820, 3641, 7282, 14564, 29127, 58254, 116508, 233017, 466034, 932068, 1864135, 3728270, 7456540, 14913081, 29826162, 59652324, 119304647, 238609294, 477218588, 954437177, 1908874354, 3817748708
Offset: 0

Views

Author

Paul Barry, Oct 28 2005

Keywords

Comments

A transform of the Jacobsthal numbers. A059633 is the equivalent transform of the Fibonacci numbers.
Paul Curtz, Aug 05 2007, observes that the inverse binomial transform of 0,0,0,1,2,4,7,14,28,57,114,228,455,910,1820,... gives the same sequence up to signs. That is, the extended sequence is an eigensequence for the inverse binomial transform (an autosequence).
The round() function enables the closed (non-recurrence) formula to take a very simple form: see Formula section. This can be generalized without loss of simplicity to a(n) = round(b^n/c), where b and c are very small, incommensurate integers (c may also be an integer fraction). Particular choices of small integers for b and c produce a number of well-known sequences which are usually defined by a recurrence - see Cross Reference. - Ross Drewe, Sep 03 2009

Crossrefs

From Ross Drewe, Sep 03 2009: (Start)
Other sequences a(n) = round(b^n / c), where b and c are very small integers:
A001045 b = 2; c = 3
A007910 b = 2; c = 5
A016029 b = 2; c = 5/3
A077947 b = 2; c = 7
abs(A078043) b = 2; c = 7/3
A007051 b = 3; c = 2
A015518 b = 3; c = 4
A034478 b = 5; c = 2
A003463 b = 5; c = 4
A015531 b = 5; c = 6
(End)

Programs

  • Magma
    [Round(2^n/9): n in [0..40]]; // Vincenzo Librandi, Aug 11 2011
    
  • Maple
    A010892 := proc(n) op((n mod 6)+1,[1,1,0,-1,-1,0]) ; end proc:
    A113405 := proc(n) (2^n-(-1)^n)/9 -A010892(n-1)/3; end proc: # R. J. Mathar, Dec 17 2010
  • Mathematica
    CoefficientList[Series[x^3/(1-2x+x^3-2x^4),{x,0,40}],x] (* or *) LinearRecurrence[{2,0,-1,2},{0,0,0,1},40] (* Harvey P. Dale, Apr 30 2011 *)
  • PARI
    a(n)=2^n\/9 \\ Charles R Greathouse IV, Jun 05 2011
    
  • Python
    def A113405(n): return ((1<Chai Wah Wu, Apr 17 2025

Formula

a(n) = 2a(n-1) - a(n-3) + 2a(n-4).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*A001045(k).
a(n) = Sum_{k=0..n} binomial((n+k)/2,k)*A001045((n-k)/2)*(1+(-1)^(n-k))/2.
a(3n) = A015565(n), a(3n+1) = 2*A015565(n), a(3n+2) = 4*A015565(n). - Paul Curtz, Nov 30 2007
From Paul Curtz, Dec 16 2007: (Start)
a(n+1) - 2a(n) = A131531(n).
a(n) + a(n+3) = 2^n. (End)
a(n) = round(2^n/9). - Ross Drewe, Sep 03 2009
9*a(n) = 2^n + (-1)^n - 3*A010892(n). - R. J. Mathar, Mar 24 2018

Extensions

Edited by N. J. A. Sloane, Dec 13 2007

A049856 a(n) = (Sum{k=0..n-1} a(k)) - a(n-3), with a(0)=0, a(1)=0, a(2)=1.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 6, 11, 21, 39, 73, 136, 254, 474, 885, 1652, 3084, 5757, 10747, 20062, 37451, 69912, 130509, 243629, 454797, 848997, 1584874, 2958580, 5522960, 10310043, 19246380, 35928380, 67069677, 125203017, 233724034, 436306771, 814480202, 1520439387
Offset: 0

Views

Author

Keywords

Comments

a(n+3) is also the number of binary words w of length n with the condition that every subword 11 of w is part of a longer subword of w containing only 1-digits. The a(3+3)=6 binary words of length 3 are 000, 001, 010, 100, 101, 111. - Alois P. Heinz, Mar 25 2009
a(n+2) is the number of compositions of n avoiding the part 3. [Joerg Arndt, Jul 13 2014]
Starting with 1 = INVERT transform of (1,1,0,1,1,1,...). Example: a(9) = 39 = (1,1,2,3,6,11,21) dot (1,1,1,1,0,1,1) = (1+1+2+3+0+11+21). - Gary W. Adamson, Apr 27 2009
For n>=4, a(n) is the number of binary strings of length n-3 without any maximal runs of ones of length 2. - Félix Balado, Aug 25 2025

Crossrefs

Cf. A049858.

Programs

  • Maple
    a:= n-> -(Matrix(4, (i, j)-> if i=j-1 then 1 elif j=1 then [2, 0, -1, 1][i] else 0 fi)^n)[3, 2]: seq (a(n), n=0..40); # Alois P. Heinz, Mar 25 2009
  • Mathematica
    LinearRecurrence[{2,0,-1,1},{0,0,1,1},40] (* Harvey P. Dale, Jul 23 2013 *)

Formula

a(n) = 2*a(n-1) - a(n-3) + a(n-4) for n >= 4.
a(n+2) = Sum_{i=0..n} F(i+1)*C(n-i,i) where F=A000045. - Benoit Cloitre, Sep 21 2004
G.f.: x^2*(1-x)/(1-2*x+x^3-x^4). - Vladimir Kruchinin, May 11 2011
a(n) = A218796(n-2,0) for n>1. - Alois P. Heinz, Nov 06 2012
a(n) = A059633(n+1) - A059633(n). - R. J. Mathar, Aug 04 2019

A049858 a(n) = Sum{a(k): k=0,1,2,...,n-4,n-2,n-1}; a(n-3) is not a summand; initial terms are 0,1,2.

Original entry on oeis.org

0, 1, 2, 3, 5, 9, 17, 32, 60, 112, 209, 390, 728, 1359, 2537, 4736, 8841, 16504, 30809, 57513, 107363, 200421, 374138, 698426, 1303794, 2433871, 4543454, 8481540, 15833003, 29556423, 55174760, 102998057, 192272694, 358927051, 670030805, 1250786973, 2334919589
Offset: 0

Views

Author

Keywords

Crossrefs

Pairwise sums of A049856. Partial sums of A049864.

Programs

Formula

a(n) = 2*a(n-1) -a(n-3) +a(n-4).
G.f. x*(x-1)*(1+x) / ( -1+2*x-x^3+x^4 ). - R. J. Mathar, Nov 12 2012
a(n) = A059633(n+2)-A059633(n). - R. J. Mathar, Aug 16 2017

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

Original entry on oeis.org

0, 0, 2, 3, 6, 10, 21, 42, 86, 171, 342, 682, 1365, 2730, 5462, 10923, 21846, 43690, 87381, 174762, 349526, 699051, 1398102, 2796202, 5592405, 11184810, 22369622, 44739243, 89478486, 178956970, 357913941, 715827882, 1431655766, 2863311531, 5726623062, 11453246122
Offset: 0

Views

Author

Paul Curtz, May 17 2014

Keywords

Comments

Generally, a(n) is an autosequence if its inverse binomial transform is (-1)^n*a(n). It is of the first kind if the main diagonal is 0's and the first two upper diagonals (just above the main one) are the same. It is of the second kind if the main diagonal is equal to the first upper diagonal multiplied by 2. If the first upper diagonal is an autosequence, the sequence is a super autosequence. Example: A113405. The first upper diagonal is A001045(n). Another super autosequence: 0, 0, 0 followed by A059633(n). The first upper diagonal is A000045(n).
Difference table of a(n):
0, 0, 2, 3, 6, 10, 21, 42, ...
0, 2, 1, 3, 4, 11, 21, 44, ...
2, -1, 2, 1, 7, 10, 23, 41, ...
-3, 3, -1, 6, 3, 13, 18, 45, ... .
This is an autosequence of the second kind. The main diagonal is 2*A001045(n) = A078008(n). More precisely it is a super autosequence, companion of A113405(n).
a(n+1) mod 10 = period 12: repeat 0, 2, 3, 6, 0, 1, 2, 6, 1, 2, 2, 5.
It is shifted A081374(n+1) mod 10 =
period 12: repeat 1, 2, 2, 5, 0, 2, 3, 6, 0, 1, 2, 6.
a(n) mod 9 = period 18:
repeat 0, 0, 2, 3, 6, 1, 3, 6, 5, 0, 0, 7, 6, 3, 8, 6, 3, 4 = c(n).
c(n) + c(n+9) = 0, 0, 9, 9, 9, 9, 9, 9, 9.

Examples

			G.f. = 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 21*x^6 + 42*x^7 + 86*x^8 + ...
		

Crossrefs

Cf. A000032, 1/(n+1), A164555/A027642 (all autosequences of 2nd kind). A007283, A175805.

Programs

  • Mathematica
    a[n_] := (m = Mod[n, 6]; 1/3*(2^n + (-1)^n + 1/120*(m-6)*(m+1)*(m^3-29*m+40))); Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 19 2014, a non-recursive formula, after Mathematica's RSolve *)
    LinearRecurrence[{2, 0, -1, 2}, {0, 0, 2, 3},50] (* G. C. Greubel, Feb 21 2017 *)
  • PARI
    concat([0,0], Vec(x^2*(x-2)/((x+1)*(2*x-1)*(x^2-x+1)) + O(x^100))) \\ Colin Barker, May 18 2014

Formula

a(n+3) = 3*2^n - a(n), a(0)=a(1)=0, a(2)=2.
a(n) = 2*A113405(n+1) - A113405(n).
a(n+1) = 2*a(n) + period 6: repeat 0, 2, -1, 0, -2, 1. a(0)=0.
a(n) = 2^n - A081374(n+1).
a(n+3) = a(n+1) + A130755(n).
G.f.: x^2*(x-2) / ((x+1)*(2*x-1)*(x^2-x+1)). - Colin Barker, May 18 2014
a(n) = A024495(n) + A131531(n).
a(n+6) = a(n) + 21*2^n, a(0)=a(1)=0, a(2)=2, a(3)=3, a(4)=6, a(5)=10.
a(n) = A001045(n) - A092220(n).
a(n+12) = a(n) + 1365*2^n. First 12 values in the Data. (A024495(n+12) = A024495(n) + 1365*2^n).
a(3n) = A132805(n) = 3*A015565(n).
a(3n+1) = A132804(n) = 6*A015565(n).
a(3n+2) = A132397(n) = 2*A082311(n).
a(n) = 1/3*((-1)^n - 2*cos((n*Pi)/3) + 2^n). - Alexander R. Povolotsky, Jun 02 2014

Extensions

More terms from Colin Barker, May 18 2014

A290987 Expansion of (1 - 2*x + x^2 - x^4 + x^3 + x^5)/((1 - x)^2*(1 - 2*x + x^3 - x^4)).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 63, 122, 233, 441, 830, 1557, 2915, 5451, 10186, 19026, 35529, 66337, 123849, 231211, 431631, 805768, 1504193, 2807986, 5241856, 9785309, 18266848, 34099850, 63656272, 118831031, 221829087, 414101780, 773028830, 1443059634, 2693846606
Offset: 0

Views

Author

R. J. Mathar, Aug 16 2017

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,2,4,8,16,32]; [n le 6 select I[n] else 4*Self(n-1)-5*Self(n-2) +Self(n-3)+3*Self(n-4)-3*Self(n-5)+Self(n-6): n in [1..40]]; // Vincenzo Librandi, Aug 17 2017
    
  • Maple
    f:= gfun:-rectoproc({a(n)-3*a(n+1)+3*a(n+2)+a(n+3)-5*a(n+4)+4*a(n+5)-a(n+6), a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 8, a(4) = 16, a(5) = 32}, a(n),remember):
    map(f, [$0..50]); # Robert Israel, Aug 16 2017
  • Mathematica
    DeleteCases[#, 0] &@ CoefficientList[Series[(1-2x+x^2-x^4+x^3+x^5)/((1-x)^2*(1-2x +x^3-x^4)), {x,0,34}], x] (* Michael De Vlieger, Aug 16 2017 *)
    LinearRecurrence[{4,-5,1,3,-3,1}, {1,2,4,8,16,32}, 40] (* Vincenzo Librandi, Aug 17 2017 *)
  • PARI
    Vec((1-2*x+x^2-x^4+x^3+x^5)/((1-x)^2*(1-2*x+x^3-x^4)) + O(x^50)) \\ Michel Marcus, Aug 17 2017
    
  • SageMath
    def A290987_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-2*x+x^2-x^4+x^3+x^5)/((1-x)^2*(1-2*x+x^3-x^4)) ).list()
    A290987_list(50) # G. C. Greubel, Apr 12 2023

Formula

a(n) = A059633(n+2) + A059633(n+3) - n.

A290989 Expansion of x^6*(1 + x^3)/(1 - 4*x + 5*x^2 - x^3 - 2*x^4 + x^6 + x^7 - 2*x^8 + x^9).

Original entry on oeis.org

1, 4, 11, 26, 55, 109, 208, 389, 722, 1339, 2488, 4634, 8646, 16146, 30160, 56333, 105198, 196413, 366672, 684475, 1277701, 2385080, 4452277, 8311254, 15515091, 28963012, 54067156, 100930660, 188413624, 351723304, 656583197
Offset: 6

Views

Author

R. J. Mathar, Aug 16 2017

Keywords

Comments

This corresponds to S(213,1,x) of Langley if one uses Theorem 8. Note that all three expressions for S(213;t,x), S(213;1,x) and the series on page 22 are mutually incompatible, so we show the sequence one would most likely see in other publications.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x^6*(1+x^3)/((1-x)*(1-2*x+x^3-x^4)*(1-x+x^4)) )); // G. C. Greubel, Apr 12 2023
    
  • Mathematica
    DeleteCases[#, 0] &@ CoefficientList[Series[x^6*(1+x^3)/(1 -4x +5x^2 -x^3 -2x^4 +x^6 +x^7 -2x^8 +x^9), {x, 0, 36}], x] (* Michael De Vlieger, Aug 16 2017 *)
    LinearRecurrence[{4,-5,1,2,0,-1,-1,2,-1}, {1,4,11,26,55,109,208,389,722}, 80] (* Vincenzo Librandi, Aug 17 2017 *)
  • SageMath
    def A290989_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x^6*(1+x^3)/((1-x)*(1-x+x^4)*(1-2*x+x^3-x^4)) ).list()
    a=A290989_list(50); a[6:] # G. C. Greubel, Apr 12 2023

Formula

G.f.: x^6*(1 + x)*(1 - x + x^2)/((1 - x)*(1 - 2*x + x^3 - x^4)*(1 - x + x^4)).
a(n) = -2 + (1/19)*( 9*A099530(n+1) + 15*A099530(n) + 2*A099530(n-1) - A099530(n- 2) + 10*A059633(n+4) - 6*A059633(n+3) - 16*A059633(n+2) - A059633(n+1) ). - G. C. Greubel, Apr 12 2023

A118892 Number of binary sequences of length n containing exactly one subsequence 0110.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 12, 30, 70, 156, 339, 722, 1515, 3140, 6444, 13116, 26513, 53280, 106530, 212062, 420503, 830964, 1637055, 3216240, 6303099, 12324816, 24049953, 46841550, 91074760, 176796340, 342696000, 663363750, 1282457260, 2476394580
Offset: 0

Views

Author

Emeric Deutsch, May 04 2006

Keywords

Comments

Column 1 of A118890. Convolution of A059633 with itself (disregard the 0 terms).

Examples

			a(5)=4 because we have 01100,01101,00110 and 10110.
		

Crossrefs

Programs

  • Maple
    G:=z^4/(1-2*z+z^3-z^4)^2: Gser:=series(G,z=0,37): seq(coeff(Gser,z,n),n=0..34);

Formula

G.f.=z^4/(1-2z+z^3-z^4)^2.
+(-n+4)*a(n) +2*(n-3)*a(n-1) +(-n+1)*a(n-3) +n*a(n-4)=0. - R. J. Mathar, Jul 26 2022

A265826 a(0) = 1, a(n) = Sum_{k=1..n} a(n-k)*ceiling(sin(k)).

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 45, 84, 157, 293, 547, 1021, 1906, 3558, 6642, 12399, 23146, 43208, 80659, 150571, 281080, 524709, 979506, 1828503, 3413376, 6371955, 11894912, 22204949, 41451316, 77379669, 144449290, 269652192, 503375992, 939682290
Offset: 0

Views

Author

Griffin N. Macris, Apr 06 2016

Keywords

Comments

It appears that a(n) <= A088353(n). They are identical until n=11 where a(11) = 547, but A088353(n) = 548.
It also appears that a(n) <= A059633(n+2). They are identical until n=25 where a(25) = 3413376, but A059633(27) = 3413377.

Examples

			a(4) = 1*ceiling(sin(4)) + 1*ceiling(sin(3)) + 2*ceiling(sin(2)) + 4*ceiling(sin(1)) = 1*0 + 1*1 + 2*1 + 4*1 = 7.
		

Programs

  • Java
    int limit = 500; //limit index, can be changed for more terms
    BigInteger[] n = new BigInteger[limit];
    n[0] = BigInteger.ONE;
    System.out.println("0 1");
    for ( int i = 1; i < n.length; i++ ) {
       n[i] = BigInteger.ZERO;
       for(int k = 1; k <= i; k++) {
          n[i] = n[i].add(n[i-k].multiply(BigInteger.valueOf((long) Math.ceil(Math.sin(k)))));
       }
       System.out.println(i+" "+n[i]);
    }
  • Mathematica
    A[0] := 1
    A[n_] := A[n] = If[n <= 0, 0, Sum[A[n - k]Ceiling[Sin[k]], {k, 1, n}]]

Formula

a(0) = 1
a(n) = Sum_{k=1..n} a(n-k)*ceiling(sin(k)).
Showing 1-8 of 8 results.