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.

Previous Showing 21-30 of 41 results. Next

A118923 Triangle T(n,k) built by placing T(n,0)=A000012(n) in the left edge, T(n,n)=A079978(n) on the right edge and filling the body with the Pascal recurrence T(n,k) = T(n-1,k) + T(n-1,k-1).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 1, 3, 3, 2, 0, 1, 4, 6, 5, 2, 0, 1, 5, 10, 11, 7, 2, 1, 1, 6, 15, 21, 18, 9, 3, 0, 1, 7, 21, 36, 39, 27, 12, 3, 0, 1, 8, 28, 57, 75, 66, 39, 15, 3, 1, 1, 9, 36, 85, 132, 141, 105, 54, 18, 4, 0, 1, 10, 45, 121, 217, 273, 246, 159, 72, 22, 4, 0, 1, 11, 55, 166
Offset: 0

Views

Author

Alford Arnold, May 05 2006

Keywords

Comments

The fourth diagonal is 1, 2, 5, 11, 21, ..., which is 1 + A000292. The fifth diagonal is 0, 2, 7, 18, 39, 75, 132, 217, 338, 504, 725, 1012, ..., which is A051743.
The array A007318 is generated by placing A000012 on both edges with the same Pascal-like recurrence, and the array A059259 uses edges defined by A000012 and A059841. - R. J. Mathar, Jan 21 2008
From Michael A. Allen, Nov 30 2021: (Start)
T(n,n-k) is the (n,k)-th entry of the (1/(1-x^3), x/(1-x)) Riordan array.
Sums of rows give A077947.
Sums of antidiagonals give A079962. (End)

Examples

			The table begins
  1
  1  0
  1  1  0
  1  2  1  1
  1  3  3  2  0
  1  4  6  5  2  0
  1  5 10 11  7  2  1
  1  6 15 21 18  9  3  0
		

Crossrefs

Programs

  • Maple
    A000012 := proc(n) 1 ; end: A079978 := proc(n) if n mod 3 = 0 then 1; else 0 ; fi ; end: A118923 := proc(n,k) if k = 0 then A000012(n); elif k = n then A079978(n) ; else A118923(n-1,k)+A118923(n-1,k-1) ; fi ; end: for n from 0 to 15 do for k from 0 to n do printf("%d, ",A118923(n,k)) ; od: od: # R. J. Mathar, Jan 21 2008
  • Mathematica
    Flatten@Table[CoefficientList[Series[1/((1 + x*y + x^2*y^2)(1 - x - x*y)), {x, 0, 23}, {y, 0, 11}], {x, y}][[n + 1, k + 1]], {n, 0, 11}, {k, 0, n}] (* Michael A. Allen, Nov 30 2021 *)

Formula

From Michael A. Allen, Nov 30 2021: (Start)
For 0 <= k < n, T(n,k) = (n-k)*Sum_{j=0..floor(k/3)} binomial(n-3*j,n-k)/(n-3*j).
G.f.: 1/((1+x*y+(x*y)^2)*(1-x-x*y)). (End)

Extensions

Edited and extended by R. J. Mathar, Jan 21 2008
Offset changed by Michael A. Allen, Nov 30 2021

A246720 Number A(n,k) of partitions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 1, 0, 1, 1, 3, 0, 1, 0, 1, 1, 0, 2, 0, 3, 1, 1, 0, 1, 0, 1, 0, 2, 0, 4, 0, 1, 0, 1, 0, 1, 1, 1, 2, 1, 4, 1, 1, 0, 1, 1, 0, 1, 2, 0, 3, 0, 5, 0, 1, 0, 1, 1, 2, 0, 1, 2, 0, 3, 0, 5, 1, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 02 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1,  1, ...
  0, 1, 0, 1, 0, 1, 0, 1, 0, 0,  1, 1, 0, 0,  1, ...
  0, 1, 1, 2, 0, 1, 0, 1, 1, 0,  2, 1, 1, 0,  2, ...
  0, 1, 0, 2, 1, 2, 0, 1, 1, 0,  3, 1, 0, 0,  2, ...
  0, 1, 1, 3, 0, 2, 1, 2, 1, 0,  4, 1, 2, 0,  4, ...
  0, 1, 0, 3, 0, 2, 0, 2, 1, 1,  5, 2, 0, 0,  4, ...
  0, 1, 1, 4, 1, 3, 0, 2, 2, 0,  7, 2, 2, 1,  6, ...
  0, 1, 0, 4, 0, 3, 0, 2, 1, 0,  8, 2, 0, 0,  6, ...
  0, 1, 1, 5, 0, 3, 1, 3, 2, 0, 10, 2, 3, 0,  9, ...
  0, 1, 0, 5, 1, 4, 0, 3, 2, 0, 12, 2, 0, 0,  9, ...
  0, 1, 1, 6, 0, 4, 0, 3, 2, 1, 14, 3, 3, 0, 12, ...
		

Crossrefs

Main diagonal gives A246721.
Cf. A246688, A246690 (the same for compositions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1, `if`(l=[], 0,
          add(g(n-l[-1]*j, subsop(-1=NULL, l)), j=0..n/l[-1])))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..16);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i > n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[ n >= Length[l], l = Join[l, b[i, 1]]; i++ ]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n == 0, 1, If[l == {}, 0, Sum[g[n - l[[-1]] j, ReplacePart[l, -1 -> Nothing]], {j, 0, n/l[[-1]]}]]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 16}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A029047 Expansion of 1/((1-x)*(1-x^3)*(1-x^6)*(1-x^10)).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 7, 7, 10, 11, 11, 14, 16, 16, 20, 22, 23, 27, 30, 31, 36, 39, 41, 46, 50, 52, 59, 63, 66, 73, 78, 81, 90, 95, 99, 108, 115, 119, 130, 137, 142, 153, 162, 167, 180, 189, 196, 209, 220, 227, 242, 253, 262, 277, 290, 299, 317, 330
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into the first four triangular numbers, 1, 3, 6 and 10.

Crossrefs

Cf. A008620.

Programs

  • Maple
    M:= Matrix(20, (i,j)-> if (i=j-1) or (j=1 and member(i, [1, 3, 6, 14, 17, 19])) then 1 elif j=1 and member(i, [4, 7, 9, 11, 13, 16, 20]) then -1 elif j=1 and i=10 then 2 else 0 fi): a:= n-> (M^(n))[1,1]: seq(a(n), n=0..80); # Alois P. Heinz, Jul 25 2008
  • Mathematica
    CoefficientList[Series[1/((1-x)(1-x^3)(1-x^6)(1-x^10)),{x,0,70}],x] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    Vec(1/((1-x)*(1-x^3)*(1-x^6)*(1-x^10))+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012
    
  • PARI
    a(n)=floor((2*n^3+60*n^2+527*n+1243+9*(n+1)*(-1)^n+(120*(n\3+1)*[1,1,-2]+20*[61,41,0])[n%3+1])/2160) \\ Tani Akinari, May 07 2014

Formula

a(n) = floor((2*n^3 + 60*n^2 + 567*n + 9*n*(-1)^n + 2160)/2160 - (n/18)*[(n mod 3)=2] + (1/5)*([(n mod 6)=0] - [(n mod 6)=5])). - Hoang Xuan Thanh, Jul 06 2025

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

Original entry on oeis.org

-1, -1, 2, 3, -4, -10, 5, 29, 2, -76, -45, 178, 212, -361, -750, 565, 2282, -306, -6206, -2428, 15176, 14353, -32719, -55104, 57933, 176234, -61524, -499047, -97429, 1271400, 921652, -2887641, -3948938, 5590078, 13380187, -7828378, -39536779, 108416, 104810904
Offset: 0

Views

Author

Roger L. Bagula, Jun 05 2007

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50);
    Coefficients(R!( -1/(1-x+3*x^2-2*x^3+x^4-2*x^5+x^6) )); // G. C. Greubel, Sep 28 2024
    
  • Mathematica
    CoefficientList[Series[-1/(1-x +3*x^2 -2*x^3 +x^4 -2*x^5 +x^6), {x,0,50}], x]
  • SageMath
    def A129920_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( -1/(1-x+3*x^2-2*x^3+x^4-2*x^5+x^6) ).list()
    A129920_list(50) # G. C. Greubel, Sep 28 2024

Formula

a(n) = a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) + 2*a(n-5) - a(n-6), n >= 6. - Franck Maminirina Ramaharo, Jan 08 2019

Extensions

Edited by Franck Maminirina Ramaharo, Jan 08 2019

A141828 a(n) = (n^4*a(n-1)-1)/(n-1) for n >= 2, with a(0) = 1, a(1) = 5.

Original entry on oeis.org

1, 5, 79, 3199, 272981, 42653281, 11055730435, 4424134795739, 2588750874763849, 2123099311165701661, 2358999234628557401111, 3453810779419670890966615, 6510747302004208690462157149, 15496121141045183700690805861049
Offset: 0

Views

Author

Peter Bala, Jul 09 2008

Keywords

Comments

For related recurrences of the form a(n) = (n^k*a(n-1)-1)/(n-1) see A001339, A007808 (both k = 2) and A141827 (k = 3). a(n) is a difference divisibility sequence, that is, the difference a(n) - a(m) is divisible by n - m for all n and m (provided n is not equal to m). See A000522 for further properties of difference divisibility sequences.

Crossrefs

Programs

  • Maple
    a := n -> n!^3*add((n-k+1)*(k^2+k+1)/k!^3, k = 0..n): seq(a(n), n = 0..16);
  • Mathematica
    nxt[{n_,a_}]:={n+1,((n+1)^4*a-1)/n}; Join[{1},NestList[nxt,{1,5},15][[All,2]]] (* Harvey P. Dale, Mar 12 2017 *)

Formula

Sum_{n>=0} a(n)*x^n/n!^3 = (1/(1-x)^2)*Sum_{n>=0} (n^2+n+1)*x^n/n!^3.
a(n) = n!^3*Sum_{k=0..n} (n-k+1)*(k^2+k+1)/k!^3.
a(n) = n*n!^3*(5 - Sum_{k=2..n} 1/(k!^3*k*(k-1))) for n > 0. [corrected by Jason Yuen, Jan 31 2025]
Congruence property: a(n) == (1+n+n^2+n^3) (mod n^4).
The recurrence a(n) = (n^3+n^2+n+2)*a(n-1) - (n-1)^3*a(n-2), n >= 2, shows that a(n) is always a positive integer. The sequence b(n) := n*n!^3 also satisfies the same recurrence with b(0) = 0, b(1) = 1. Hence we obtain the finite continued fraction expansion a(n)/(n*n!^3) = 5 - 1^3/(16 - 2^3/(41 - 3^3/(86 -...-(n-1)^3/(n^3+n^2+n+2)))), for n >= 1. a(n)*b(n+1) - b(n)*a(n+1) = n!^3.
Limit_{n->oo} a(n)/(n*n!^3) = Sum_{n>=0} (n^2+n+1)/n!^3 = 4.9367223378... .
Limit_{n->oo} a(n)/(n*n!^3) = 1 + Sum_{n>=0} 1/(Product_{k=0..n} A008620(k)).

A331943 a(n) = n^2 + 1 - ceiling((n + 2)/3).

Original entry on oeis.org

1, 3, 8, 15, 23, 34, 47, 61, 78, 97, 117, 140, 165, 191, 220, 251, 283, 318, 355, 393, 434, 477, 521, 568, 617, 667, 720, 775, 831, 890, 951, 1013, 1078, 1145, 1213, 1284, 1357, 1431, 1508, 1587, 1667, 1750, 1835, 1921, 2010, 2101, 2193, 2288, 2385, 2483, 2584
Offset: 1

Views

Author

Hugo Pfoertner, Feb 10 2020

Keywords

Comments

Related to expansion of exp(2*(H_k-gamma))/k^2 in powers of 1/k as given by A331777/A331778.
The agreement with the results of the PARI code needs an explanation. All numerators corresponding to the computed denominators are 1.

Crossrefs

Programs

  • Mathematica
    Table[n^2+1-Ceiling[(n+2)/3],{n,60}] (* or *) LinearRecurrence[{2,-1,1,-2,1},{1,3,8,15,23},60] (* Harvey P. Dale, Aug 30 2021 *)
  • PARI
    H(n)=sum(j=1,n,1/j);
    A(k)=exp(2*(H(k)-Euler))/k^2;
    for(k=1,51,r=(1/k)*(A(k)-1);print1(denominator(bestappr(r,k*k)),", "))

Formula

From Colin Barker, Feb 10 2020: (Start)
G.f.: x*(1 + x + 3*x^2 + x^3) / ((1 - x)^3*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>5.
(End)
E.g.f.: (1/9)*(3*exp(x)*x*(2 + 3*x) + 2*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)). - Stefano Spezia, Feb 14 2020

A348388 Irregular triangle read by rows: T(n, k) = floor((n-k)/k), for k = 1, 2, ..., floor(n/2) and n >= 2.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 5, 2, 1, 6, 2, 1, 7, 3, 1, 1, 8, 3, 2, 1, 9, 4, 2, 1, 1, 10, 4, 2, 1, 1, 11, 5, 3, 2, 1, 1, 12, 5, 3, 2, 1, 1, 13, 6, 3, 2, 1, 1, 1, 14, 6, 4, 2, 2, 1, 1, 15, 7, 4, 3, 2, 1, 1, 1, 16, 7, 4, 3, 2, 1, 1, 1, 17, 8, 5, 3, 2, 2, 1, 1, 1, 18, 8, 5, 3, 2, 2, 1, 1, 1, 19, 9, 5, 4, 3, 2, 1, 1, 1, 1
Offset: 2

Views

Author

Wolfdieter Lang, Oct 31 2021

Keywords

Comments

This irregular triangle T(n, k) gives the number of multiples of number k, larger than k and not exceeding n, for k = 1, 2, ..., floor(n/2), for n >= 2. See A348389 for the array of these multiples.
The length of row n is floor(n/2) = A004526(n), for n >= 2.
The row sums give A002541(n). See the formula given there by Wesley Ivan Hurt, May 08 2016.
The columns give the k-fold repeated positive integers k, for k >= 1.

Examples

			The irregular triangle T(n, k) begins:
n\k   1 2 3 4 5 6 7 8 9 10 ...
------------------------------
2:    1
3:    2
4:    3 1
5:    4 1
6:    5 2 1
7:    6 2 1
8:    7 3 1 1
9:    8 3 2 1
10:   9 4 2 1 1
11:  10 4 2 1 1
12:  11 5 3 2 1 1
13:  12 5 3 2 1 1
14:  13 6 3 2 1 1 1
15:  14 6 4 2 2 1 1
16:  15 7 4 3 2 1 1 1
17:  16 7 4 3 2 1 1 1
18:  17 8 5 3 2 2 1 1 1
19:  18 8 5 3 2 2 1 1 1
20:  19 9 5 4 3 2 1 1 1  1
...
		

Crossrefs

Columns k (with varying offsets): A000027, A004526, A008620, A008621, A002266, A097992, ...

Programs

  • Mathematica
    T[n_, k_] := Floor[(n - k)/k]; Table[T[n, k], {n, 2, 20}, {k, 1, Floor[n/2]}] // Flatten (* Amiram Eldar, Nov 02 2021 *)
  • Python
    def A348388row(n): return [(n - k) // k for k in range(1, 1 + n // 2)]
    for n in range(2, 21): print(A348388row(n))  # Peter Luschny, Nov 05 2021

Formula

T(n, k) = floor((n-k)/k), for k = 1, 2, ..., floor(n/2) and n >= 2.
G.f. of column k: G(k, x) = x^(2*k)/((1 - x)*(1 - x^k)).

A353205 Expansion of e.g.f. (1 - x^3)^(1 + 1/x + 1/x^2).

Original entry on oeis.org

1, -1, -1, -1, 13, 19, -29, 251, 281, -13033, 56071, -28601, -10136411, 57321419, -39757717, -17223709021, 139901102641, -12418205969, -56710054724849, 628073178260687, 380303328920381, -324513582131326141, 4616335903275095539, 5642278545451902859
Offset: 0

Views

Author

Seiichi Manyama, Apr 30 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 25; CoefficientList[Series[(1 - x^3)^(1 + 1/x + 1/x^2), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, May 09 2022 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace((1-x^3)^(1+1/x+1/x^2)))
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(-sum(k=1, N, x^k/((k+2)\3)))))
    
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=-(i-1)!*sum(j=1, i, j/((j+2)\3)*v[i-j+1]/(i-j)!)); v;

Formula

E.g.f.: exp( -Sum{k >= 1} x^k/A008620(k-1) ).
a(0) = 1; a(n) = -(n-1)! * Sum_{k=1..n} k/A008620(k-1) * a(n-k)/(n-k)!.

A052569 E.g.f. 1/((1-x)(1-x^3)).

Original entry on oeis.org

1, 1, 2, 12, 48, 240, 2160, 15120, 120960, 1451520, 14515200, 159667200, 2395008000, 31135104000, 435891456000, 7846046208000, 125536739328000, 2134124568576000, 44816615940096000, 851515702861824000
Offset: 0

Views

Author

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

Keywords

Programs

  • Maple
    spec := [S,{S=Prod(Sequence(Prod(Z,Z,Z)),Sequence(Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    # Alternative:
    f:= gfun:-rectoproc({ a(1)=1, a(0)=1, a(2)=2, (-14*n-n^3-7*n^2-8)*a(n)+(-2-n)*a(n+1)+a(n+3)-a(n+2)=0},a(n),remember):
    map(f, [$0..30]); # Robert Israel, Sep 25 2019
  • Mathematica
    With[{nn=20},CoefficientList[Series[1/((1-x)(1-x^3)),{x,0,nn}],x]Range[0,nn]!] (* Harvey P. Dale, Aug 25 2012 *)

Formula

E.g.f.: 1/(-1+x)/(-1+x^3)
Recurrence: {a(1)=1, a(0)=1, a(2)=2, (-14*n-n^3-7*n^2-8)*a(n)+(-2-n)*a(n+1)+a(n+3)-a(n+2)=0}
(1/3*n+2/3+Sum(1/9*(-1+_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^2+_Z+1)))*n!
a(n) = n!*A008620(n). - R. J. Mathar, Nov 27 2011

A058936 Decomposition of Stirling's S(n,2) based on associated numeric partitions.

Original entry on oeis.org

0, 1, 3, 8, 3, 30, 20, 144, 90, 40, 840, 504, 420, 5760, 3360, 2688, 1260, 45360, 25920, 20160, 18144, 403200, 226800, 172800, 151200, 72576, 3991680, 2217600, 1663200, 1425600, 1330560, 43545600, 23950080, 17740800, 14968800, 13685760, 6652800, 518918400
Offset: 1

Views

Author

Alford Arnold, Jan 11 2001

Keywords

Comments

These values also appear in a wider context when counting elements of finite groups by cycle structure. For example, the alternating group on four symbols has 12 elements; eight associated with the partition 3+1, three associated with 2+2 and the identity associated with 1+1+1+1. The cross-referenced sequences are all associated with similar numeric partitions and "M2" weights.

Examples

			Triangle begins:
  0;
  1;
  3;
  8, 3;
  30, 20;
  144, 90, 40;
  840, 504, 420;
  ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 831.

Crossrefs

Formula

From Sean A. Irvine, Sep 05 2022: (Start)
T(1,1) = 0.
T(n,k) = n! / (k * (n-k)) for 1 <= k < n/2.
T(2n,n) = (2*n)! / (2*n^2).
(End)

Extensions

More terms from Sean A. Irvine, Sep 05 2022
Previous Showing 21-30 of 41 results. Next