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.

A024996 Triangular array, read by rows: second differences in n,n direction of trinomial array A027907.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 0, 1, 1, 1, 3, 2, 3, 1, 1, 1, 2, 5, 6, 8, 6, 5, 2, 1, 1, 3, 8, 13, 19, 20, 19, 13, 8, 3, 1, 1, 4, 12, 24, 40, 52, 58, 52, 40, 24, 12, 4, 1, 1, 5, 17, 40, 76, 116, 150, 162, 150, 116, 76, 40, 17, 5, 1, 1, 6, 23, 62, 133, 232, 342, 428, 462, 428, 342, 232, 133, 62, 23, 6
Offset: 0

Views

Author

Keywords

Comments

For n > 2, T(n,k) is the number of integer strings s(0), ..., s(n) such that s(n) = n - k, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2 and <= 1 for i >= 3.

Examples

			                  1
               1  0  1
            1  0  2  0  1
         1  1  3  2  3  1  1
      1  2  5  6  8  6  5  2  1
   1  3  8 13 19 20 19 13  8  3  1
		

Crossrefs

First differences in n, n direction of array A025177.
Central column is essentially A024997, other columns are A024998, A026069, A026070, A026071. Row sums are in A025579.

Programs

  • Julia
    using Nemo
    function A024996Expansion(prec)
        R, t = PolynomialRing(ZZ, "t")
        S, x = PowerSeriesRing(R, prec+1, "x")
        ser = divexact(x^2*t^3 + x^2*t + x*t - 1, x*t^2 + x*t + x - 1)
        L = zeros(ZZ, prec^2)
        for k ∈ 0:prec-1, n ∈ 0:2*k
            L[k^2+n+1] = coeff(coeff(ser, k), n)
        end
        L
    end
    A024996Expansion(8) |> println # Peter Luschny, Jun 25 2020
  • Maple
    A024996 := proc(n,k)
        option remember;
        if n < 0 or k < 0 or k > 2*n then
            0 ;
        elif n <= 2 then
            if k = 2*n or k = 0 then
                1;
            elif k = 2*n-1 or k = 1 then
                0;
            elif k =2 then
                2;
            end if;
        else
            procname(n-1,k-1)+procname(n-1,k-2)+procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Jun 23 2013
    seq(seq(A024996(n,k), k=0..2*n), n=0..11); # added by Georg Fischer, Jun 24 2020
  • Mathematica
    nmax = 10; CoefficientList[CoefficientList[Series[y*x + (1 - y*x)^2/(1 - x*(1 + y + y^2)), {x, 0, nmax}, {y, 0, 2*nmax}], x], y] // Flatten (* G. C. Greubel, May 22 2017; amended by Georg Fischer, Jun 24 2020 *)
  • PARI
    T(n,k)=if(n<0||k<0||k>2*n,0,if(n==0,1,if(n==1,[1,0,1][k+1],if(n==2,[1,0,2,0,1][k+1],T(n-1,k-2)+T(n-1,k-1)+T(n-1,k))))) \\ Ralf Stephan, Jan 09 2004
    nmax=8; for(n=0, nmax, for(k=0, 2*n, print1(T(n,k),","))) \\ added by _Georg Fischer, Jun 24 2020
    

Formula

T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 0, 1], [1, 0, 2, 0, 1].
G.f.: y*z + (1-y*z)^2 / (1-z*(1+y+y^2)). - Ralf Stephan, Jan 09 2005 [corrected by Peter Luschny, Jun 25 2020]

Extensions

Edited by Ralf Stephan, Jan 09 2004
Offset corrected by R. J. Mathar, Jun 23 2013

A025179 a(n) = number of (s(0), s(1), ..., s(n)) such that s(i) is an integer, s(0) = 0, |s(1)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2, s(n) = 1. Also a(n) = T(n,n-1), where T is the array defined in A025177.

Original entry on oeis.org

1, 4, 10, 29, 81, 231, 659, 1891, 5443, 15718, 45508, 132067, 384047, 1118820, 3264642, 9539787, 27913083, 81769236, 239794422, 703906719, 2068153899, 6081507831, 17896695831, 52703944965, 155310270101, 457956633826, 1351132539604
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Rest[Rest[CoefficientList[Series[((1-x)^2-(1-x)*Sqrt[1-2*x-3*x^2]) /(2*x*Sqrt[1-2*x-3*x^2]), {x, 0, 20}], x]]] (* Vaclav Kotesovec, Feb 13 2014 *)
  • PARI
    my(x='x+O('x^50)); Vec(((1-x)^2-(1-x +2*x^2)*sqrt(1-2*x-3*x^2)) /(2*x*sqrt(1 - 2*x -3*x^2))) \\ G. C. Greubel, Mar 01 2017

Formula

Equals (1/2) * A024997(n+1).
From Vladeta Jovovic, Jan 01 2004: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*binomial(2*k+1, k+1).
E.g.f.: exp(x)*(BesselI(0, 2*x)+BesselI(2, 2*x)). (End)
From Paul Barry, Sep 17 2005: (Start)
G.f.: ((1-x)^2 - (1-x)*sqrt(1-2*x-3*x^2))/(2*x*sqrt(1-2*x-3*x^2)).
a(n+1) = Sum_{k=0..n} C(n, k)*C(k+1, k/2+1)*(1+(-1)^k)/2. (End)
D-finite with recurrence (n+1)*a(n) +(-3*n+1)*a(n-1) +(-n-5)*a(n-2) +3*(n-3)*a(n-3)=0. - R. J. Mathar, Nov 26 2012
a(n) ~ 3^(n-1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Feb 13 2014
Prepend 1 to the data, assume offset 0, and denote the resulting sequence alpha. Then alpha(n) = Sum_{k=0..n} Sum_{j=0..k} A359364(n, n - j). - Peter Luschny, Jan 10 2023

A026083 a(n) = number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0 = s(n), |s(i) - s(i-1)| = 1 for i = 1,2,3; |s(i) - s(i-1)| <= 1 for i >= 4. Also a(n) = T(n,n), where T is the array defined in A026082.

Original entry on oeis.org

6, 12, 38, 104, 300, 856, 2464, 7104, 20550, 59580, 173118, 503960, 1469546, 4291644, 12550290, 36746592, 107712306, 316050372, 928224594, 2728494360, 8026707864, 23630376000, 69614498268, 205212650272, 605292727450, 1786351811556
Offset: 4

Views

Author

Keywords

Comments

Third differences of the central trinomial numbers (A002426). - T. D. Noe, Mar 16 2005

Crossrefs

Equals 2 * A024998(n-1). First differences of A024997.

Formula

Conjecture: n*a(n) +(-3*n+5)*a(n-1) +(-n-6)*a(n-2) +3*(n-5)*a(n-3)=0. - R. J. Mathar, Jun 22 2013

A385641 Partial sums of A097893.

Original entry on oeis.org

1, 3, 8, 20, 51, 133, 356, 972, 2695, 7557, 21372, 60840, 174097, 500295, 1442720, 4172752, 12099411, 35161001, 102375400, 298586652, 872177273, 2551118623, 7471195500, 21904500500, 64286141881, 188844619563, 555216323396, 1633658183432, 4810340397375, 14173698242137
Offset: 0

Views

Author

Mélika Tebni, Aug 03 2025

Keywords

Comments

Second partial sums of the central trinomial coefficients (A002426).
Third partial sums of A025178 (sequence starting 1, 0, 2, 4, 12, 32, 90 .... with offset 0).
For p prime of the form 4*k + 3 (A002145), a(p) + 1 == 0 (mod p).
For p Pythagorean prime (A002144), a(p) - 3 == 0 (mod p).
Sequences with g.f. (1-x)^k / sqrt(1-2*x-3*x^2): this sequence (k=-2), A097893 (k=-1), A002426 (k=0), A025178 (k=1), A024997 (k=2), A026083 (k=3). - Mélika Tebni, Aug 25 2025

Crossrefs

Programs

  • Maple
    a := series(exp(x)*(BesselI(0, 2*x) + 2*int(BesselI(0, 2*x), x) + int(int(BesselI(0, 2*x), x), x)), x = 0, 30): seq(n!*coeff(a, x, n), n = 0 .. 29);
  • PARI
    a(n) = sum(k=0, n, sum(i=0, k, sum(j=0, i, binomial(i, i-j)*binomial(j, i-j)))); \\ Michel Marcus, Aug 06 2025
  • Python
    from math import comb as C
    def a(n):
        return sum(C(n+1, k+1)*C(2*(k//2), k//2) for k in range(n + 1))
    print([a(n) for n in range(30)])
    

Formula

G.f.: (1 / sqrt((1 + x)*(1 - 3*x))) / (1 - x)^2.
E.g.f.: exp(x)*(BesselI(0, 2*x) + 2*g(x) + Integral_{x=-oo..oo} g(x) dx) where g(x) = Integral_{x=-oo..oo} BesselI(0, 2*x) dx.
D-finite with recurrence n*a(n) = (4*n-1)*a(n-1) - (2*n+1)*a(n-2) - (4*n-5)*a(n-3) + 3*(n-1)*a(n-4).
a(0) = 1, a(1) = 3 and a(n) = a(n-2) - 1 + 2*A383527(n) for n >= 2.
a(n) = Sum_{k=0..n} binomial(n+1, k+1)*A128014(k).
a(n) = Sum_{k=0..n} (2*A247287(k) + k+1).
a(n) ~ 3^(n + 5/2) / (8*sqrt(Pi*n)). - Vaclav Kotesovec, Aug 03 2025
Sum_{k=0..n} A295112(n-k)*a(k) + binomial(n+3, 3) = 0. - Mélika Tebni, Sep 03 2025
Showing 1-4 of 4 results.