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-10 of 13 results. Next

A291382 p-INVERT of (1,1,0,0,0,0,...), where p(S) = 1 - 2 S - S^2.

Original entry on oeis.org

2, 7, 22, 70, 222, 705, 2238, 7105, 22556, 71608, 227332, 721705, 2291178, 7273743, 23091762, 73308814, 232731578, 738846865, 2345597854, 7446508273, 23640235416, 75050038224, 238259397096, 756395887969, 2401310279090, 7623377054503, 24201736119310
Offset: 0

Views

Author

Clark Kimberling, Sep 04 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,1,0,0,0,...) = A019590, in some cases t(1,1,0,0,0,...) is a shifted version of the cited sequence:
p(S) t(1,1,0,0,0,...)
1 - S A000045 (Fibonacci numbers)
1 - S^2 A094686
1 - S^3 A115055
1 - S^4 A291379
1 - S^5 A281380
1 - S^6 A281381
1 - 2 S A002605
1 - 3 S A125145
(1 - S)^2 A001629
(1 - S)^3 A001628
(1 - S)^4 A001629
(1 - S)^5 A001873
(1 - S)^6 A001874
1 - S - S^2 A123392
1 - 2 S - S^2 A291382
1 - S - 2 S^2 A124861
1 - 2 S - S^2 A291383
(1 - 2 S)^2 A073388
(1 - 3 S)^2 A291387
(1 - 5 S)^2 A291389
(1 - 6 S)^2 A291391
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 3 S) A291394
(1 - 2 S)(1 - 3 S) A291395
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 2 S)(1 - 3 S) A291396
1 - S - S^3 A291397
1 - S^2 - S^3 A291398
1 - S - S^2 - S^3 A186812
1 - S - S^2 - S^3 - S^4 A291399
1 - S^2 - S^4 A291400
1 - S - S^4 A291401
1 - S^3 - S^4 A291402
1 - 2 S^2 - S^4 A291403
1 - S^2 - 2 S^4 A291404
1 - 2 S^2 - 2 S^4 A291405
1 - S^3 - S^6 A291407
(1 - S)(1 - S^2) A291408
(1 - S^2)(1 - S)^2 A291409
1 - S - S^2 - 2 S^3 A291410
1 - 2 S - S^2 + S^3 A291411
1 - S - 2 S^2 + S^3 A291412
1 - 3 S + S^2 + S^3 A291413
1 - 2 S + S^3 A291414
1 - 3 S + S^2 A291415
1 - 4 S + S^2 A291416
1 - 4 S + 2 S^2 A291417

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^2; p = 1 - 2 s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A019590 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291382 *)

Formula

G.f.: (-2 - 3 x - 2 x^2 - x^3)/(-1 + 2 x + 3 x^2 + 2 x^3 + x^4).
a(n) = 2*a(n-1) + 3*a(n-2) + 2*a(n-3) + a(n-4) for n >= 5.

A079962 Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i=1..n, with k=1, r=5, I={1,3}.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 14, 22, 36, 58, 94, 153, 247, 399, 646, 1045, 1691, 2737, 4428, 7164, 11592, 18756, 30348, 49105, 79453, 128557, 208010, 336567, 544577, 881145, 1425722, 2306866, 3732588, 6039454, 9772042, 15811497, 25583539, 41395035
Offset: 0

Views

Author

Vladimir Baltic, Feb 19 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {1,3,5,6}. - Mark Dols, Aug 20 2010

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Magma
    [Round(Fibonacci(n+3)/4): n in [0..40]]; // G. C. Greubel, Jan 21 2022
    
  • Maple
    with(combinat,fibonacci): seq(round(fibonacci(n+3)/4),n=0..38) # Mircea Merca, Jan 04 2011
  • Mathematica
    LinearRecurrence[{1,0,1,0,1,1}, {1,1,1,2,3,5}, 41] (* G. C. Greubel, Jan 21 2022 *)
  • PARI
    a(n)=fibonacci(n+3)\/4 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [(1/4)*(fibonacci(n+3) + chebyshev_U(n,1/2) + chebyshev_U(2*n,1/2)) for n in (0..40)] # G. C. Greubel, Jan 21 2022

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-6).
G.f.: 1/((1+x+x^2)*(1-x+x^2)*(1-x-x^2)).
a(n+1)/a(n) -> golden ratio A001622. - Roger L. Bagula, Mar 13 2006
a(n) + a(n+2) + a(n+4) = Fibonacci(n+5). - Mark Dols, Aug 20 2010
a(n) = round(Fibonacci(n+3)/4). - Mircea Merca, Jan 04 2011
a(n+6) - a(n) = A000045(n+6). - Paul Curtz, Jun 29 2013
a(n) + a(n+1) + a(n+2) = A024490(n+6). - R. J. Mathar, Jun 30 2013
a(n) - a(n-1) + a(n-2) = A094686(n). - R. J. Mathar, Jun 30 2013
4*a(n) = A057078(n) + A010892(n) + A000045(n+3). - R. J. Mathar, Nov 02 2016

A093040 Expansion of (1+x)/((1+x+x^2)(1-x-x^2)).

Original entry on oeis.org

1, 1, 1, 3, 4, 6, 11, 17, 27, 45, 72, 116, 189, 305, 493, 799, 1292, 2090, 3383, 5473, 8855, 14329, 23184, 37512, 60697, 98209, 158905, 257115, 416020, 673134, 1089155, 1762289, 2851443, 4613733, 7465176, 12078908, 19544085, 31622993, 51167077
Offset: 0

Views

Author

Paul Barry, Mar 15 2004

Keywords

Comments

The sequence 0,1,1,1,3... has a(n) = Fib(n+1)/2-A049347(n)/2. It counts paths of length n between two of the vertices of the graph with adjacency matrix [0,1,0,0;0,0,1,1;1,1,0,0;0,0,1,0].
Diagonal sums of Riordan array ((1+x), x(1+x)^2). - Paul Barry, May 31 2006
a(n) is the number of compositions of n into parts 1,2,3 with no two consecutive 1's. For example a(5) = 6 because we have: 3+2, 2+3, 1+3+1, 2+2+1, 2+1+2, 1+2+2. - Geoffrey Critzer, Mar 15 2014
a(n) is the number of compositions of n+1 into an odd number of parts 1 and 2, that is, the number of barcodes of width n+1 with alternating black and white bars of width 1 or 2 and black border (see the first recurrence formula). - Grégoire Nicollier, Apr 04 2022

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 11*x^6 + 17*x^7 + 27*x^8 + 45*x^9 + ...
		

References

  • MacKay, Information Theory, Inference and Learning Algorithms, CUP, 2003, p. 251

Crossrefs

Programs

  • Magma
    [Floor(Fibonacci(n+3)/2)-Floor(Fibonacci(n+1)/2): n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
    
  • Mathematica
    CoefficientList[Series[((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2,{x,0,50}],x] (* Vincenzo Librandi, Jul 10 2012 *)
    a[ n_] := SeriesCoefficient[ If[ n < 0, x^3 (1 + x) / (1 + 2 x + x^2 - x^4), (1 + x) / (1 - x^2 - 2 x^3 - x^4)], {x, 0, Abs@n}]; (* Michael Somos, Mar 19 2014 *)
    LinearRecurrence[{0, 1, 2, 1}, {1, 1, 1, 3}, 39] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    Vec(((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2 + O(x^50)) \\ Michel Marcus, Sep 27 2014

Formula

G.f.: ((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2.
a(n) = a(n-2) + 2*a(n-3) + a(n-4).
a(n) = Fib(n+2)/2+sqrt(3)sin(2*Pi*n/3+Pi/3)/3 = Fib(n+2)/2+A057078(n)/2.
a(n-1) = Sum_{k=0..floor(n/2)} if(mod(n-k, 2)=1, binomial(n-k, k), 0).
a(n-1) = A094686(n) - Fib(n). - Paul Barry, Jan 13 2005
a(n) = Sum_{k=0..floor(n/2)} binomial(2k+1,n-2k). - Paul Barry, May 31 2006
a(n) = floor(Fibonacci(n+3)/2) - floor(Fibonacci(n+1)/2). - Gary Detlefs, Mar 13 2011
a(n) = a(n-2) + 2*a(n-3) + a(n-4), a(-3-n) = (-1)^n * A005252(n) for all n in Z. - Michael Somos, Mar 19 2014
a(n-1) + 2*a(n) - a(n+2) = a(n) - a(n-1) - a(n-2) = A057078(n) for all n in Z. - Michael Somos, Mar 19 2014
2*a(n) = A057078(n) + A000045(n+2). - R. J. Mathar, Sep 16 2017

A113067 Expansion of -x/((x^2+x+1)*(x^2+3*x+1)); invert transform gives signed version of tetrahedral numbers A000292.

Original entry on oeis.org

0, -1, 4, -11, 28, -72, 188, -493, 1292, -3383, 8856, -23184, 60696, -158905, 416020, -1089155, 2851444, -7465176, 19544084, -51167077, 133957148, -350704367, 918155952, -2403763488, 6293134512, -16475640049, 43133785636, -112925716859, 295643364940, -774004377960
Offset: 0

Views

Author

Creighton Dement, Oct 13 2005

Keywords

Comments

Invert(a(n)) gives (0, -1, 4, -10, 20, -35, ...) = A000292 (with alternating signs).
Binomial(a(n)) gives (0, -1, 2, -2, 4, -7, 10, ...) = A094686 (with alternating signs, from 2nd term).
Floretion Algebra Multiplication Program, FAMP Code: 2basei[C*F]; C = - .5'j + .5'k - .5j' + .5k' - 'ii' - .5'ij' - .5'ik' - .5'ji' - .5'ki'; F = + .5'i + .5'ii' + .5'ij' + .5'ik'

References

  • Creighton Dement, Floretion Integer Sequences (work in progress).

Crossrefs

Programs

  • Mathematica
    -x/((x^2+x+1)*(x^2+3*x+1)) + O[x]^30 // CoefficientList[#, x]& (* Jean-François Alcover, Jun 15 2017 *)
  • PARI
    concat(0, Vec(-x / ((1 + x + x^2)*(1 + 3*x + x^2)) + O(x^30))) \\ Colin Barker, May 11 2019
  • SageMath
    [((lucas_number1(n,3,1)-lucas_number1(n,1,1)))/(-2) for n in range(1,32)] # Zerinvary Lajos, Jul 06 2008
    

Formula

a(n) + a(n+1) + a(n+2) = (-1)^n *A001906(n+2) = (-1)^n*F(2n+4).
a(n) + 3*a(n+1) + 3*a(n+2) + a(n+3) = ((-1)^(n+1))*A109961(n+2).
(|a(n)|) = A290890(n) for n >= 0, this being the p-INVERT of (1,2,3,4,...), where p(S) = 1 - S^2. - Clark Kimberling, Aug 21 2017
a(n) = -4*a(n-1) - 5*a(n-2) - 4*a(n-3) - a(n-4) for n > 3. - Colin Barker, May 11 2019
2*a(n) = (-1)^n*A001906(n+1) - A049347(n). - R. J. Mathar, Sep 20 2020

A116088 Riordan array (1, x*(1+x)^2).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 1, 4, 1, 0, 0, 6, 6, 1, 0, 0, 4, 15, 8, 1, 0, 0, 1, 20, 28, 10, 1, 0, 0, 0, 15, 56, 45, 12, 1, 0, 0, 0, 6, 70, 120, 66, 14, 1, 0, 0, 0, 1, 56, 210, 220, 91, 16, 1, 0, 0, 0, 0, 28, 252, 495, 364, 120, 18, 1
Offset: 0

Views

Author

Paul Barry, Feb 04 2006

Keywords

Examples

			Triangle begins as:
  1;
  0, 1;
  0, 2, 1;
  0, 1, 4,  1;
  0, 0, 6,  6,  1;
  0, 0, 4, 15,  8,  1;
  0, 0, 1, 20, 28, 10,  1;
  0, 0, 0, 15, 56, 45, 12, 1;
		

Crossrefs

Row sums are A002478. Diagonal sums are A094686. Inverse is (-1)^(n-k) * A109971(n,k). Unsigned version of A109970.

Programs

  • GAP
    Flat(List([0..10], n->List([0..n], k-> Binomial(2*k, n-k) ))); # G. C. Greubel, May 09 2019
  • Magma
    [[Binomial(2*k, n-k): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 09 2019
    
  • Mathematica
    Flatten[Table[Binomial[2k,n-k],{n,0,20},{k,0,n}]] (* Harvey P. Dale, Oct 22 2012 *)
  • PARI
    {T(n,k) = binomial(2*k, n-k)}; \\ G. C. Greubel, May 09 2019
    
  • Sage
    [[binomial(2*k, n-k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 09 2019
    

Formula

G.f.: 1/(1-x*y*(1+x)^2).
Number triangle T(n,k) = C(2*k, n-k) = C(n,k)*C(3*k,n)/C(3*k,k).

A109970 Riordan array (1,x(1-x)^2).

Original entry on oeis.org

1, 0, 1, 0, -2, 1, 0, 1, -4, 1, 0, 0, 6, -6, 1, 0, 0, -4, 15, -8, 1, 0, 0, 1, -20, 28, -10, 1, 0, 0, 0, 15, -56, 45, -12, 1, 0, 0, 0, -6, 70, -120, 66, -14, 1, 0, 0, 0, 1, -56, 210, -220, 91, -16, 1, 0, 0, 0, 0, 28, -252, 495, -364, 120, -18, 1
Offset: 0

Views

Author

Paul Barry, Jul 06 2005

Keywords

Comments

Row sums are A077954. Diagonal sums are (-1)^n*A094686(n). Matrix inverse is A109971.

Examples

			Rows begin
1;
0,1;
0,-2,1;
0,1,-4,1;
0,0,6,-6,1;
0,0,-4,15,-8,1;
0,0,1,-20,28,-10,1;
0,0,0,15,-56,45,-12,1;
		

Formula

G.f.: 1/(1-xy(1-x)^2); Number triangle T(n, k)=binomial(2k, n-k)*(-1)^(n-k).

A113726 A Jacobsthal convolution.

Original entry on oeis.org

1, 0, 1, 4, 5, 8, 25, 44, 77, 176, 353, 660, 1365, 2776, 5417, 10876, 21981, 43648, 87153, 175076, 349669, 698280, 1398585, 2797260, 5590381, 11184720, 22373761, 44735284, 89474165, 178969208, 357910345, 715807004, 1431683837, 2863325216
Offset: 0

Views

Author

Paul Barry, Nov 08 2005

Keywords

Comments

Convolution of A001045(n+1) and A001607(n+1).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,1,4,4},{1,0,1,4},40] (* Harvey P. Dale, Apr 30 2025 *)

Formula

G.f.: 1/((1-x-2*x^2)*(1+x+2*x^2)).
a(n) = a(n-2) + 4*a(n-3) + 4*a(n-4).
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*2^k*(1+(-1)^(n-k))/2.
a(n) = 2^n/3 + (-1)^n/6 + A001607(n+1)/2. - R. J. Mathar, Aug 23 2011
a(n) = sum(A128099(n, n-2*k), k=0..floor(n/2)). - Johannes W. Meijer, Aug 28 2013

A283834 Number of length-n binary vectors beginning with 0, ending with 1, and avoiding 4 consecutive 0's and 4 consecutive 1's.

Original entry on oeis.org

1, 0, 1, 2, 4, 6, 12, 22, 41, 74, 137, 252, 464, 852, 1568, 2884, 5305, 9756, 17945, 33006, 60708, 111658, 205372, 377738, 694769, 1277878, 2350385, 4323032, 7951296, 14624712, 26899040, 49475048, 90998801, 167372888, 307846737, 566218426, 1041438052
Offset: 0

Views

Author

N. J. A. Sloane, Mar 25 2017

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) )); // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    CoefficientList[Series[1/((1+x)*(1+x^2)*(1-x-x^2-x^3)), {x,0,50}], x] (* Indranil Ghosh, Mar 26 2017 *)
  • PARI
    Vec(1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) + O(x^50)) \\ Indranil Ghosh, Mar 26 2017
    
  • SageMath
    @CachedFunction
    def b(n): # b = A000073
        if (n<3): return (0,0,1)[n]
        else: return b(n-1) + b(n-2) + b(n-3)
    def A283834(n): return (1/4)*((-1)^n +i^n*((n+1)%2) -i^(n+3)*(n%2) +2*b(n+2))
    [A283834(n) for n in range(41)] # G. C. Greubel, Feb 09 2023

Formula

G.f.: 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)). - Alois P. Heinz, Mar 25 2017
a(n) = (1/4)*((-1)^n + i^n*(n+1 mod 2) - i^(n+3)*(n mod 2) + 2*A000073(n+2)). - G. C. Greubel, Feb 09 2023

Extensions

More terms from Alois P. Heinz, Mar 25 2017

A283838 Irregular triangle read by rows: T(n,k) (n >= 8, 3 <= k <= floor(n/2)-1) = number of binary vectors of length <= n that start with 1^k, 0, end with 1, 0^k, and the factor between 1^k and 0^k does not contain 0^k or 1^k.

Original entry on oeis.org

1, 3, 5, 1, 9, 3, 16, 7, 1, 26, 13, 3, 43, 25, 7, 1, 71, 47, 15, 3, 115, 88, 29, 7, 1, 187, 162, 57, 15, 3, 304, 299, 111, 31, 7, 1, 492, 551, 215, 61, 15, 3, 797, 1015, 416, 121, 31, 7, 1, 1291, 1867, 802, 239, 63, 15, 3, 2089, 3435, 1547, 471, 125, 31, 7, 1, 3381, 6319, 2983, 927, 249, 63, 15, 3
Offset: 8

Views

Author

N. J. A. Sloane, Mar 25 2017

Keywords

Examples

			Triangle begins:
     1,
     3,
     5,     1,
     9,     3,
    16,     7,    1,
    26,    13,    3,
    43,    25,    7,    1,
    71,    47,   15,    3,
   115,    88,   29,    7,   1,
   187,   162,   57,   15,   3,
   304,   299,  111,   31,   7,   1,
   492,   551,  215,   61,  15,   3,
   797,  1015,  416,  121,  31,   7,  1,
  1291,  1867,  802,  239,  63,  15,  3,
  2089,  3435, 1547,  471, 125,  31,  7, 1,
  3381,  6319, 2983,  927, 249,  63, 15, 3,
  5472, 11624, 5751, 1824, 495, 127, 31, 7, 1,
  ...
		

Crossrefs

For row sums see A283839.

Programs

  • Mathematica
    gf[k_] := x^(2k)(x-x^k)^2 / ((1-x)(1-x^k)(1-2x+x^k));
    T[n_, k_] := SeriesCoefficient[gf[k], {x, 0, n}];
    Table[T[n, k], {n, 8, 24}, {k, 3, Floor[n/2]-1}] // Flatten (* Jean-François Alcover, Apr 05 2017 *)

A124369 Riordan array (1/((1-x-x^2)(1+x+x^2)),x(1+x)/((1-x-x^2)(1+x+x^2))).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 6, 4, 3, 1, 4, 9, 12, 7, 4, 1, 7, 17, 24, 21, 11, 5, 1, 10, 34, 48, 50, 34, 16, 6, 1, 17, 58, 103, 110, 91, 52, 22, 7, 1, 28, 104, 200, 250, 220, 152, 76, 29, 8, 1, 44, 188, 385, 534, 530, 400, 239, 107, 37, 9, 1
Offset: 0

Views

Author

Paul Barry, Oct 27 2006

Keywords

Comments

Row sums are A123392. Diagonal sums are A124370. First column is A094686. Product of A026729 and abs(A049310).

Examples

			Triangle begins
1,
0, 1,
1, 1, 1,
2, 2, 2, 1,
2, 6, 4, 3, 1,
4, 9, 12, 7, 4, 1,
7, 17, 24, 21, 11, 5, 1,
10, 34, 48, 50, 34, 16, 6, 1,
17, 58, 103, 110, 91, 52, 22, 7, 1
		

Formula

Number triangle T(n,k)=sum{j=0..n, C(j,n-j)*C((j+k)/2,(j-k)/2)*(1+(-1)^(j-k))/2};
T(n,k) = T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + 2*T(n-3,k) + T(n-4,k), T(0,0) = 1, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 22 2014
Showing 1-10 of 13 results. Next