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.

A135261 a(n) = 3*A131090(n) - A131090(n+1).

Original entry on oeis.org

-1, 3, -1, 2, -1, 5, 6, 17, 27, 58, 111, 229, 454, 913, 1819, 3642, 7279, 14565, 29126, 58257, 116507, 233018, 466031, 932069, 1864134, 3728273, 7456539, 14913082, 29826159, 59652325, 119304646, 238609297, 477218587, 954437178, 1908874351, 3817748709, 7635497414
Offset: 0

Views

Author

Paul Curtz, Dec 01 2007

Keywords

Programs

  • GAP
    a:=[-1,2,-1,2];; for n in [5..40] do a[n]:=2*a[n-1] -a[n-3] +2*a[n-4]; od; a; # G. C. Greubel, Nov 21 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)) )); // G. C. Greubel, Nov 21 2019
    
  • Maple
    seq(coeff(series((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Nov 21 2019
  • Mathematica
    LinearRecurrence[{2,0,-1,2}, {-1,3,-1,2}, 40] (* G. C. Greubel, Oct 07 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1))) \\ G. C. Greubel, Nov 21 2019
    
  • Sage
    def A135261_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1))).list()
    A135261_list(40) # G. C. Greubel, Nov 21 2019
    

Formula

A131090(n) - a(n) = A131556(n).
O.g.f.: (1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)). - R. J. Mathar, Jul 22 2008
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4). - G. C. Greubel, Oct 07 2016

Extensions

Edited and extended by R. J. Mathar, Jul 22 2008

A131088 2*A051731 - A054525 as infinite lower triangular matrices.

Original entry on oeis.org

1, 3, 1, 3, 0, 1, 2, 3, 0, 1, 3, 0, 0, 0, 1, 1, 3, 3, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 2, 2, 0, 3, 0, 0, 0, 1, 2, 0, 3, 0, 0, 0, 0, 0, 1, 1, 3, 0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 3, 0, 3, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Jun 14 2007

Keywords

Comments

Row sums = A131089.
A131090: (1, 3, 3, 2, 3, 1, 3, 2, 2, 1, ...) in every column interspersed with (k-1) zeros.

Examples

			First few rows of the triangle:
  1;
  3, 1;
  3, 0, 1;
  2, 3, 0, 1;
  3, 0, 0, 0, 1;
  1, 3, 3, 0, 0, 1
  3, 0, 0, 0, 0, 0, 1;
  2, 2, 0, 3, 0, 0, 0, 1;
  ...
		

Crossrefs

Cf. A129979 (left border), A131089 (row sums), A051731, A054525.

Programs

  • PARI
    T(n,k) = 2*!(n%k) - if (!(n % k), moebius(n/k), 0);
    row(n) = vector(n, k, T(n,k));
    lista(nn) = for (n=1, nn, v = row(n); for (k=1, #v, print1(v[k], ", "))); \\ Michel Marcus, Feb 26 2022

Extensions

More terms from Michel Marcus, Feb 26 2022

A225887 a(n) = A212205(2*n + 1).

Original entry on oeis.org

1, 4, 18, 86, 426, 2162, 11166, 58438, 309042, 1648154, 8851206, 47813790, 259585002, 1415431266, 7747200558, 42545600310, 234346445154, 1294260644906, 7165245015510, 39754745775886, 221009855334426, 1230909476804594, 6867024985408638, 38369226561522086
Offset: 0

Views

Author

Michael Somos, May 19 2013

Keywords

Comments

From Peter Bala, Apr 23 2017: (Start)
a(n) is also the number of Schröder paths of semilength n (paths from (0, 0) to (2*n, 0), using only single steps northeast or southeast (steps (1, 1) or (1, -1)) or double steps east (steps (2, 0)), that never fall below the x-axis) in which the (2,0)-steps that are on the horizontal axis come in 3 colors (see Oste and Van der Jeugt, Section 7).
Example: a(2) = 18 because from the origin to the point (4,0) we have 3^2 = 9 paths of type HH, 3 paths of type HUD, 3 paths of type UDH as well as the paths UDUD, UUDD, and UHD.
It follows that the sequence may be calculated as the leading diagonal of the lower triangular array (T(n,k))n,k>=0 defined by the relations: T(n,0) = 1, T(n,k) = T(n,k-1) + T(n-1,k) + T(n-1,k-1) for 1 <= k <= n-1 and T(n,n) = 3*T(n-1,n-1) + T(n,n-1). The array begins: [1], [1, 4], [1, 6, 18], [1, 8, 32, 86], [1, 10, 50, 168, 426]. (End)

Examples

			1 + 4*x + 18*x^2 + 86*x^3 + 426*x^4 + 2162*x^5 + 11166*x^6 + 58438*x^7 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ 2 / (1 - 5 x + Sqrt[1 - 6 x + x^2]), {x, 0, n}]
  • Maxima
    a(n):=sum((k+1)*sum(binomial(j,n-k-j)*3^(-n+k+2*j)*2^(n-k-j)*binomial(n+1,j),j,0,n+1),k,0,n)/(n+1); /* Vladimir Kruchinin, Mar 13 2016 */
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 2 / (1 -  5*x + sqrt(1 - 6*x + x^2 + x * O(x^n))), n))}
    

Formula

G.f.: (-1 + 5*x + sqrt(1 - 6*x + x^2)) / (2 * (x - 6*x^2)) = 2 / (1 - 5*x + sqrt(1 - 6*x + x^2)).
G.f.: A(x) = 1 / (1 - 5*x + (x - 6*x^2) * A(x)) = 1 + x * A(x) * (5 - A(x) * (1 - 6*x)).
INVERT transform of A001003(n+1). INVERT transform is A134425.
HANKEL transform is A006125. HANKEL transform with 1 prepended is A127850(n+1).
BINOMIAL transform of A151090.
Conjecture: (n+1)*a(n) +3*(-4*n-1)*a(n-1) +(37*n-20)*a(n-2) +6*(-n+2)*a(n-3)=0. - R. J. Mathar, May 23 2014
a(n) = Sum_{k=0..n}((k+1)*Sum_{j=0..n+1}(binomial(j,n-k-j)*3^(-n+k+2*j)*2^(n-k-j)*binomial(n+1,j)))/(n+1). - Vladimir Kruchinin, Mar 13 2016
a(n) ~ (1+sqrt(2))^(2*n+5) / (2^(3/4)*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 13 2016
G.f.: 1/(1-3*x -x/(1-x -x/(1-x -x/(1-x - ... )))) (continued fraction) = 1/(1 - 3*x - x*S(x)), where S(x) is the generating function of the large Schröder numbers A001003. - Peter Bala, Apr 23 2017

A131089 a(n) = Sum_{d|n} (2 - mu(d)).

Original entry on oeis.org

1, 4, 4, 6, 4, 8, 4, 8, 6, 8, 4, 12, 4, 8, 8, 10, 4, 12, 4, 12, 8, 8, 4, 16, 6, 8, 8, 12, 4, 16, 4, 12, 8, 8, 8, 18, 4, 8, 8, 16, 4, 16, 4, 12, 12, 8, 4, 20, 6, 12, 8, 12, 4, 16, 8, 16, 8, 8, 4, 24, 4, 8, 12, 14, 8, 16, 4, 12, 8, 16, 4, 24, 4, 8, 12, 12, 8, 16
Offset: 1

Views

Author

Gary W. Adamson, Jun 14 2007

Keywords

Comments

Apart from the first term the same as A062011. - Andrew Howroyd, Aug 09 2018

Examples

			a(4) = 6 = (2 + 3 + 0 + 1), row 4 of A131088.
		

Crossrefs

Row sums of triangle A131088.

Programs

  • Magma
    [1] cat [2*NumberOfDivisors(n) : n in [2..100] ]; // Vincenzo Librandi, Aug 10 2018
  • Mathematica
    Join[{1}, Table[2 DivisorSigma[0, n], {n, 100}]] (* Vincenzo Librandi, Aug 10 2018 *)
  • PARI
    a(n)={2*numdiv(n) - (n==1)} \\ Andrew Howroyd, Aug 09 2018
    

Formula

a(n) = 2*tau(n) = A062011(n) for n > 1. - Andrew Howroyd, Aug 09 2018
Inverse Moebius transform of A228483.

Extensions

Name changed and terms a(10) and beyond from Andrew Howroyd, Aug 09 2018
Showing 1-4 of 4 results.