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.

User: Dan Li

Dan Li's wiki page.

Dan Li has authored 11 sequences. Here are the ten most recent ones:

A383433 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,0),(0,2),(1,0),(1,2),(2,1)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 12, 76, 556, 4592, 42328, 431184, 4812936, 58440200, 767098296, 10826066776, 163496360680, 2631146363384, 44953977477160, 812713132751832, 15501004918724712, 311078390317974872, 6552553451281418472, 144550752700158416920, 3332886257051337065128, 80168754370190239256408
Offset: 0

Author

Dan Li, Apr 27 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 12 solutions are these 12 permutations: 13524, 14253, 24153, 25314, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: (2*A(t) - t - 1)/(A(t) - t) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383434 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,2),(1,0),(1,1),(2,0),(2,1)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 10, 68, 500, 4170, 38730, 397172, 4459116, 54421082, 717571442, 10167743668, 154104395348, 2487968793386, 42630767594522, 772730550801940, 14773475294401180, 297121458577213850, 6270996358146824738, 138591948457411817684, 3200867594024256790020, 77112844928711640695594
Offset: 0

Author

Dan Li, Apr 27 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 10 solutions are these 10 permutations: 24153, 25314, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: 1 + t + 1/(1 + t) - 1/A(t) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383407 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,1),(0,2),(1,0),(1,2),(2,0),(2,1)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 88, 636, 5174, 47122, 475124, 5257936, 63380706, 826813990, 11606987816, 174484661916, 2796700455414, 47613243806514, 858079661762692, 16320191491499712, 326687622910353650, 6865552738575268502, 151139376627154723752, 3478151378775992816412, 83516519907235226131286
Offset: 0

Author

Dan Li, Apr 26 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: (1 + t)*(1 + t + t*(2 + t)*A(t))*A(t)/(1 + t + t*A(t))^2 where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383408 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,0),(0,2),(1,0),(1,1),(1,2),(2,1)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 88, 632, 5152, 46972, 474008, 5248616, 63294680, 825940168, 11597278752, 174367336624, 2795167052832, 47591679875632, 857754907053056, 16314976128578752, 326598651690933216, 6863945954213702816, 151108752072042907968, 3477537076217415673344, 83503583639127861347392
Offset: 0

Author

Dan Li, Apr 26 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: (1 + t)*(A(t) - t)/(1 + t*(A(t) - t - 1)) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383406 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,0),(0,1),(1,0),(1,2),(2,1),(2,2)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 88, 632, 5152, 46976, 474056, 5249064, 63298724, 825977620, 11597642568, 174371083288, 2795208188972, 47592162832412, 857760977798888, 16315057829100968, 326599827759568812, 6863964030561807340, 151109048051281532488, 3477542225297684400056, 83503678542689445133052
Offset: 0

Author

Dan Li, Apr 25 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: (1 + t)^2 *A(t)/((1 + t)^2 + t^2*(A(t) - t - 1)*A(t)) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383107 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,0),(0,1),(0,2),(1,0),(1,2),(2,0),(2,1)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 88, 636, 5174, 47122, 475128, 5257976, 63381078, 826817350, 11607019144, 174484968604, 2796703640190, 47613279070594, 858080079253440, 16320196781972904, 326687694661023774, 6865553778933359142, 151139392725808178080, 3478151644016630307452, 83516524547918673461238
Offset: 0

Author

Dan Li, Apr 22 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Crossrefs

Formula

G.f.: (1/(1 + t) + t*(1 + t)/(1 + t + t*A(t)))*A(t) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383040 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,1),(0,2),(1,0),(2,0)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 12, 78, 568, 4674, 42944, 436314, 4860020, 58914870, 772330276, 10888803374, 164310553184, 2642525580218, 45124440536632, 815438318526482, 15547317496485932, 311912067538692126, 6568399090178800988, 144867849880285518694, 3339550150164041194232, 80315480372245746015970
Offset: 0

Author

Dan Li, Apr 22 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 12 solutions are these 12 permutations: 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Crossrefs

Formula

G.f.: (1 + t)^2*A(t)/(1 + t + t*A(t)) where A(t)=Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A383312 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,1),(0,2),(1,0),(1,1),(2,0),(2,2)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 86, 624, 5096, 46554, 470446, 5214936, 62943852, 821949042, 11548027442, 173711893048, 2785807179384, 47448884653218, 855436571437710, 16275060021803232, 325872090863707740, 6850004083354211050, 150827444158572339810, 3471582648001267649808, 83371646323922972242776
Offset: 0

Author

Dan Li, Apr 22 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

Formula

G.f.: (t + 1/(1 + t) - t^2*A(t)^2/((1 + t)*(1 + t + t*A(t))))*A(t) where A(t) = Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.

A382645 Number of king permutations on n elements not beginning with the smallest element and not ending with the largest element.

Original entry on oeis.org

1, 0, 0, 0, 2, 10, 68, 500, 4174, 38774, 397584, 4462848, 54455754, 717909202, 10171232060, 154142811052, 2488421201446, 42636471916622, 772807552752712, 14774586965277816, 297138592463202402, 6271277634164008170, 138596853553771517492, 3200958202120445923684, 77114612783976599209598
Offset: 0

Author

Dan Li, Apr 01 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 10 solutions are these 10 permutations: 24153, 25314, 31524, 35142, 35241, 41352, 42513, 42531, 52413, and 53142.
		

Crossrefs

Programs

  • Mathematica
    nmax = 20; CoefficientList[Series[x/(1+x) + Sum[k!*x^k*(1-x)^k/(1+x)^(k+2), {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Apr 04 2025 *)
  • PARI
    my(N=30, t='t+O('t^N)); Vec(t/(1+t)+sum(n=0,N,n!*t^n*(1-t)^n/(1+t)^(n+2))) \\ Joerg Arndt, Apr 03 2025

Formula

G.f.: t/(1+t) + Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^(n+2).
a(n) ~ exp(-2) * n!. - Vaclav Kotesovec, Apr 04 2025

A382644 Number of king permutations on n elements not beginning with the smallest element.

Original entry on oeis.org

1, 0, 0, 0, 2, 12, 78, 568, 4674, 42948, 436358, 4860432, 58918602, 772364956, 10889141262, 164314043112, 2642564012498, 45124893118068, 815444024669334, 15547394518030528, 311913179428480218, 6568416226627210572, 144868131187935525662, 3339555055674217441176, 80315570986097045133282
Offset: 0

Author

Dan Li, Apr 01 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 12 solutions are these 12 permutations: 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, and 53142.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1,0$3][n+1],
          (n+1)*a(n-1)-(n-3)*(a(n-2)+a(n-3))+(n-2)*a(n-4))
        end:
    seq(a(n), n=0..24);  # Alois P. Heinz, Apr 04 2025
  • Mathematica
    nmax = 20; CoefficientList[Series[Sum[k!*x^k*(1-x)^k/(1+x)^(k+1), {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Apr 04 2025 *)
  • PARI
    my(N=30, t='t+O('t^N)); Vec(sum(n=0,N,n!*t^n*(1-t)^n/(1+t)^(n+1))) \\ Joerg Arndt, Apr 03 2025

Formula

G.f.: Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^(n+1).
a(n) = (n+1)*a(n-1) - (n-3)*(a(n-2)+a(n-3)) + (n-2)*a(n-4) for n>=4. - Alois P. Heinz, Apr 04 2025
a(n) ~ exp(-2) * n!. - Vaclav Kotesovec, Apr 04 2025