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 51-60 of 106 results. Next

A289207 a(n) = max(0, n-2).

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Keywords

Comments

This simple sequence is such that there is one and only one array of differences D(n,k) where the first and the second upper subdiagonal is a(n).
The rows of this array are existing sequences of the OEIS, prepended with zeros:
row 0 is A118425,
row 1 is A006478,
row 2 is A001629,
row 3 is A010049,
row 4 is A006367,
row 5 is not in the OEIS.
It can be observed that a(n) is an autosequence of the first kind whose second kind mate is A199969. In addition, the structure of the array D(n,k) shows that the first row is an autosequence.
For n = 1 to 8, rows with only one leading zero are also autosequences.

Examples

			Array of differences begin:
   0,   0,   0,   0,  0,   0,  0,  1,  4, 12, 30, 68, ...
   0,   0,   0,   0,  0,   0,  1,  3,  8, 18, 38, 76, ...
   0,   0,   0,   0,  0,   1,  2,  5, 10, 20, 38, 71, ...
   0,   0,   0,   0,  1,   1,  3,  5, 10, 18, 33, 59, ...
   0,   0,   0,   1,  0,   2,  2,  5,  8, 15, 26, 46, ...
   0,   0,   1,  -1,  2,   0,  3,  3,  7, 11, 20, 34, ...
   0,   1,  -2,   3, -2,   3,  0,  4,  4,  9, 14, 24, ...
   1,  -3,   5,  -5,  5,  -3,  4,  0,  5,  5, 10, 16, ...
  -4,   8, -10,  10, -8,   7, -4,  5,  0,  6,  6, 17, ...
  12, -18,  20, -18, 15, -11,  9, -5,  6,  0,  7,  7, ...
  ...
		

Crossrefs

Essentially the same as A023444. Cf. A001477, A118425, A006478, A001629, A010049, A006367, A199969.

Programs

  • Mathematica
    a[n_] := Max[0, n - 2];
    D[n_, k_] /; k == n + 1 := a[n]; D[n_, k_] /; k == n + 2 := a[n]; D[n_, k_] /; k > n + 2 := D[n, k] = Sum[D[n + 1, j], {j, 0, k - 1}]; D[n_, k_] /; k <= n := D[n, k] = D[n - 1, k + 1] - D[n - 1, k];
    Table[D[n, k], {n, 0, 11}, {k, 0, 11}]

Formula

G.f.: x^3 / (1-x)^2.

A371576 G.f. satisfies A(x) = ( 1 + x*A(x)^(3/2) * (1 + x) )^2.

Original entry on oeis.org

1, 2, 9, 44, 240, 1390, 8404, 52426, 334964, 2180928, 14418123, 96525656, 653077411, 4458529390, 30674865164, 212472058410, 1480446579602, 10369560147798, 72972217926122, 515674254743332, 3657933383804959, 26036659997517572, 185905008055923918
Offset: 0

Views

Author

Seiichi Manyama, Mar 28 2024

Keywords

Crossrefs

Column k=2 of A378323.

Programs

  • PARI
    a(n, r=2, s=1, t=3, u=0) = r*sum(k=0, n, binomial(t*k+u*(n-k)+r, k)*binomial(s*k, n-k)/(t*k+u*(n-k)+r));

Formula

a(n) = 2 * Sum_{k=0..n} binomial(3*k+2,k) * binomial(k,n-k)/(3*k+2).
G.f.: A(x) = B(x)^2 where B(x) is the g.f. of A364475.

A371578 G.f. satisfies A(x) = ( 1 + x*A(x)^(5/2) * (1 + x) )^2.

Original entry on oeis.org

1, 2, 13, 102, 916, 8880, 90607, 958794, 10426089, 115798342, 1308035135, 14980661482, 173553196140, 2030265152576, 23948922940698, 284543368174220, 3402103050539715, 40903437537402792, 494215527894112099, 5997782678374854902, 73078635875447981850
Offset: 0

Views

Author

Seiichi Manyama, Mar 28 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n, r=2, s=1, t=5, u=0) = r*sum(k=0, n, binomial(t*k+u*(n-k)+r, k)*binomial(s*k, n-k)/(t*k+u*(n-k)+r));

Formula

a(n) = 2 * Sum_{k=0..n} binomial(5*k+2,k) * binomial(k,n-k)/(5*k+2).
G.f.: A(x) = B(x)^2 where B(x) is the g.f. of A365184.

A372102 Number of permutations of [n] whose non-fixed points are not neighbors.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 19, 45, 107, 278, 728, 2033, 5749, 17105, 51669, 162674, 520524, 1724329, 5807143, 20146861, 71048431, 257139686, 945626800, 3558489633, 13599579817, 53060155137, 210124405097, 847904374466, 3470756061140, 14453943647561, 61023690771451
Offset: 0

Views

Author

Alois P. Heinz, Apr 18 2024

Keywords

Examples

			a(3) = 2: 123, 321.
a(4) = 4: 1234, 1432, 3214, 4231.
a(5) = 9: 12345, 12543, 14325, 15342, 32145, 32541, 42315, 52143, 52341.
a(6) = 19: 123456, 123654, 125436, 126453, 143256, 143652, 153426, 163254, 163452, 321456, 325416, 326451, 423156, 423651, 521436, 523416, 621453, 623154, 623451.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [2$3, 4][n+1],
          3*a(n-1)+(n-2)*a(n-2)+(n-1)*(a(n-4)-a(n-3)))/2
        end:
    seq(a(n), n=0..30);
  • Mathematica
    a[n_] := Sum[Binomial[n + 1 - k, k] * Subfactorial[k], {k, 0, (n + 1)/2}];
    Table[a[n], {n, 0, 30}] (* Peter Luschny, Apr 24 2024 *)

Formula

a(n) = Sum_{j=0..floor((n+1)/2)} A000166(j)*A011973(n+1,j).
a(n) mod 2 = A131735(n+3).
Row sums of A371995(n+1), which are the antidiagonals of A098825. - Peter Luschny, Apr 24 2024
a(n) ~ sqrt(Pi) * exp(sqrt(n/2) - n/2 - 7/8) * n^(n/2 + 1) / 2^((n+3)/2). - Vaclav Kotesovec, Apr 25 2024

A384883 Number of maximal sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 02 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 27 are {1,2,4,5}, with maximal sparse subsets {{1,4},{1,5},{2,4},{2,5}}, so a(27) = 4.
		

Crossrefs

For subsets of {1..n} we get A000931 (shifted), maximal case of A000045 (shifted).
This is the maximal case of A245564.
The greatest number whose binary indices are one of these subsets is A374356.
For prime instead of binary indices we have A385215, maximal case of A166469.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A202064 counts subsets containing n with k maximal runs.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    maximize[sys_]:=Complement@@Prepend[Most[Subsets[#]]&/@sys,sys];
    Table[Length[maximize[spars[bpe[n]]]],{n,0,100}]

A385572 Number of subsets of {1..n} with the same number of maximal runs (increasing by 1) as maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 4, 7, 12, 19, 34, 63, 112, 207, 394, 739, 1398, 2687, 5152, 9891, 19128, 37039, 71754, 139459, 271522, 528999, 1032308, 2017291, 3945186, 7723203, 15134440, 29679407, 58245068, 114389683, 224796210, 442021743, 869658304, 1711914351, 3371515306
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

Also the number of subsets of {1..n} with the same number of adjacent elements increasing by 1 as adjacent elements increasing by more than 1.

Examples

			The set {2,3,5,6,8} has maximal runs ((2,3),(5,6),(8)) and maximal anti-runs ((2),(3,5),(6,8)) so is counted under a(8).
The a(0) = 1 through a(6) = 19 subsets:
  {}  {}   {}   {}   {}       {}       {}
      {1}  {1}  {1}  {1}      {1}      {1}
           {2}  {2}  {2}      {2}      {2}
                {3}  {3}      {3}      {3}
                     {4}      {4}      {4}
                     {1,2,4}  {5}      {5}
                     {1,3,4}  {1,2,4}  {6}
                              {1,2,5}  {1,2,4}
                              {1,3,4}  {1,2,5}
                              {1,4,5}  {1,2,6}
                              {2,3,5}  {1,3,4}
                              {2,4,5}  {1,4,5}
                                       {1,5,6}
                                       {2,3,5}
                                       {2,3,6}
                                       {2,4,5}
                                       {2,5,6}
                                       {3,4,6}
                                       {3,5,6}
		

Crossrefs

The LHS is counted by A034839 (for partitions A384881, strict A116674), rank statistic A069010.
The case containing n + 1 is A217615.
The RHS is counted by A384893 or A210034 (for partitions A268193, strict A384905), rank statistic A384890.
Subsets of this type are ranked by A385575.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [1, 2, 3, 4, 7][n+1], ((3*n-4)*a(n-1)-
          (3*n-5)*a(n-2)+(5*n-12)*a(n-3)-2*(4*n-11)*a(n-4)+4*(n-3)*a(n-5))/(n-1))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jul 06 2025
  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2==#1+1&]]==Length[Split[#,#2!=#1+1&]]&]],{n,0,10}]
  • PARI
    a(n)=polcoef([1,1,1]*[x,0,0;x,x^2,1;0,x,x]^n*[1,0,0]~,n) \\ Christian Sievers, Jul 06 2025

Formula

Let M be the matrix [1,0,0; 1,x,1/x; 0,1,1]. Then a(n) is the sum of the constant terms of the entries in the left column of M^n. - Christian Sievers, Jul 06 2025

Extensions

a(21) and beyond from Christian Sievers, Jul 06 2025

A054453 Triangle of partial row sums of triangle A054450(n,m), n >= m >= 0.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 5, 2, 1, 15, 10, 6, 2, 1, 28, 20, 12, 7, 2, 1, 51, 38, 26, 14, 8, 2, 1, 92, 71, 50, 33, 16, 9, 2, 1, 164, 130, 97, 64, 41, 18, 10, 2, 1, 290, 235, 180, 130, 80, 50, 20, 11, 2, 1, 509, 420, 332, 244, 171, 98, 60, 22, 12, 2, 1
Offset: 0

Views

Author

Wolfdieter Lang, Apr 27 2000 and May 08 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Riordan-group. The G.f. for the row polynomials p(n,x) (increasing powers of x) is ((1-z^2)*(Fib(z))^2)/(1-x*z/(1-z^2)) Fib(x)=1/(1-x-x^2) = g.f. for A000045(n+1) (Fibonacci numbers without 0).
This is the second member of the family of Riordan-type matrices obtained from the unsigned convolution matrix A049310(n,m) by repeated application of the partial row sums procedure.
The column sequences are A029907, A001629, A054454 for m=0..2.

Examples

			{1}; {2,1}; {4,2,1}; {8,5,2,1};...
Fourth row polynomial (n=3): p(3,x)= 8+5*x+2*x^2+x^3
		

Crossrefs

Cf. A049310, A054450, A000045, A029907, A001629. Row sums: A054455(n).

Formula

a(n, m)=sum(A054450(n, k), k=m..n), n >= m >= 0, a(n, m) := 0 if n
Column m recursion: a(n, m)= sum(a(j-1, m)*|A049310(n-j, 0)|, j=m..n) + A054450(n, m), n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: ((1-x^2)*(Fib(x))^2)*(x/(1-x^2))^m, m >= 0, with Fib(x) G.f. for A000045(n+1).

A086804 a(0)=0; for n > 0, a(n) = (n+1)^(n-2)*2^(n^2).

Original entry on oeis.org

0, 1, 16, 2048, 1638400, 7247757312, 164995463643136, 18446744073709551616, 9803356117276277820358656, 24178516392292583494123520000000, 271732164163901599116133024293512544256
Offset: 0

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 05 2003

Keywords

Comments

Discriminant of Chebyshev polynomial U_n (x) of second kind.
Chebyshev second kind polynomials are defined by U(0)=0, U(1)=1 and U(n) = 2xU(n-1) - U(n-2) for n > 1.
The absolute value of the discriminant of Pell polynomials is a(n-1).
Pell polynomials are defined by P(0)=0, P(1)=1 and P(n) = 2x P(n-1) + P(n-2) if n > 1. - Rigoberto Florez, Sep 01 2018

References

  • Theodore J. Rivlin, Chebyshev polynomials: from approximation theory to algebra and number theory, 2. ed., Wiley, New York, 1990; p. 219, 5.1.2.

Crossrefs

Programs

  • Magma
    [0] cat [(n+1)^(n-2)*2^(n^2): n in [1..10]]; // G. C. Greubel, Nov 11 2018
  • Mathematica
    Join[{0},Table[(n+1)^(n-2) 2^n^2,{n,10}]] (* Harvey P. Dale, May 01 2015 *)
  • PARI
    a(n)=if(n<1,0,(n+1)^(n-2)*2^(n^2))
    
  • PARI
    a(n)=if(n<1,0,n++; poldisc(poltchebi(n)'/n))
    

Formula

a(n) = ((n+1)^(n-2))*2^(n^2), n >= 1, a(0):=0.
a(n) = ((2^(2*(n-1)))*Det(Vn(xn[1],...,xn[n])))^2, n >= 1, with the determinant of the Vandermonde matrix Vn with elements (Vn)i,j:= xn[i]^j, i=1..n, j=0..n-1 and xn[i]:=cos(Pi*i/(n+1)), i=1..n, are the zeros of the Chebyshev U(n,x) polynomials.
a(n) = ((-1)^(n*(n-1)/2))*(2^(n*(n-2)))*Product_{i=1..n}((d/dx)U(n,x)|_{x=xn[i]}), n >= 1, with the zeros xn[i], i=1..n, given above.

Extensions

Formula and more terms from Vladeta Jovovic, Aug 07 2003

A089098 Sign twisted convoluted convolved Fibonacci numbers H_j^(2).

Original entry on oeis.org

1, 1, 3, 5, 11, 19, 37, 65, 120, 210, 376, 654, 1149, 1985, 3443, 5911, 10159, 17345, 29605, 50305, 85400, 144516, 244272, 411900, 693729, 1166209, 1958219, 3283145, 5498595, 9197455, 15369373, 25655489, 42787456, 71293590, 118695272, 197452746, 328227725
Offset: 1

Author

N. J. A. Sloane, Dec 05 2003

Keywords

Comments

Let "a" = the Fibonacci numbers, and "b" = the aerated Fibonacci numbers (1, 0, 1, 0, 2,...). Then A089098 = (1/2) * (a^2 + b), where a^2 = A001629, the Fibonacci numbers convolved with themselves: (1, 2, 5, 10, 20, 38,...).

Crossrefs

2nd column of A337009.

Programs

  • Maple
    with(numtheory): f := z->-1/(1-z-z^2): m := proc(r,j) d := divisors(r): W := (1/r)*z*sum(mobius(d[i])*f(z^d[i])^(r/d[i]),i=1..nops(d)): Wser := simplify(series(W,z=0,80)): coeff(Wser,z^j) end: seq(m(2,j),j=1..39);
  • Mathematica
    (1-x-x^2+x^3)/((1-x-x^2)^2*(1-x^2-x^4)) + O[x]^40 // CoefficientList[#,x]& (* Jean-François Alcover, Jan 20 2018 *)
  • PARI
    Vec(-x*(x-1)^2*(x+1)/((x^2+x-1)^2*(x^4+x^2-1)) + O(x^50)) \\ Colin Barker, Jul 23 2015

Formula

G.f.: (z/2)[1/(1-z-z^2)^2+1/(1-z^2-z^4)].
G.f.: -x*(x-1)^2*(x+1) / ((x^2+x-1)^2*(x^4+x^2-1)). - Colin Barker, Jul 23 2015

Extensions

Edited by Emeric Deutsch, Mar 06 2004

A099924 Self-convolution of Lucas numbers.

Original entry on oeis.org

4, 4, 13, 22, 45, 82, 152, 274, 491, 870, 1531, 2676, 4652, 8048, 13865, 23798, 40713, 69446, 118144, 200510, 339559, 573894, 968183, 1630632, 2742100, 4604572, 7721797, 12933334, 21637221, 36159610, 60367976, 100687786
Offset: 0

Author

Ralf Stephan, Nov 01 2004

Keywords

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 57.

Crossrefs

Cf. A001629, A000032. Bisection: A203573 (even), 2*A203574 (odd).

Programs

  • Mathematica
    Table[Sum[LucasL[k]LucasL[n-k],{k,0,n}],{n,0,40}] (* or *) LinearRecurrence[ {2,1,-2,-1},{4,4,13,22},40] (* Harvey P. Dale, Mar 06 2012 *)

Formula

a(n) = (n+1)*L(n) + 2F(n+1) = Sum_{k=0..n} L(k)*L(n-k).
G.f.: (2-x)^2/(1-x-x^2)^2, corrected Aug 23 2022
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4), a(0)=4, a(1)=4, a(2)=13, a(3)=22. - Harvey P. Dale, Mar 06 2012
a(n) = 2*A099920(n+1)-A099920(n). - R. J. Mathar, Aug 23 2022
Previous Showing 51-60 of 106 results. Next