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-10 of 10 results.

A322013 Square array A(n,k), n >= 1, k >= 1, read by antidiagonals, where A(n,k) is the number of permutations of n copies of 1..k introduced in order 1..k with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 36, 29, 1, 0, 1, 329, 1721, 182, 1, 0, 1, 3655, 163386, 94376, 1198, 1, 0, 1, 47844, 22831355, 98371884, 5609649, 8142, 1, 0, 1, 721315, 4420321081, 182502973885, 66218360625, 351574834, 56620, 1, 0
Offset: 1

Views

Author

Seiichi Manyama, Nov 24 2018

Keywords

Examples

			Square array begins:
   1, 1,     1,         1,              1,                    1, ...
   0, 1,     5,        36,            329,                 3655, ...
   0, 1,    29,      1721,         163386,             22831355, ...
   0, 1,   182,     94376,       98371884,         182502973885, ...
   0, 1,  1198,   5609649,    66218360625,     1681287695542855, ...
   0, 1,  8142, 351574834, 47940557125969, 16985819072511102549, ...
		

Crossrefs

Main diagonal gives A321666.

Programs

  • PARI
    q(n,x) = sum(i=1, n, (-1)^(n-i) * binomial(n-1, n-i) * x^i/i!)
    T(n,k) = subst(serlaplace(q(n,x)^k), x, 1)/k! \\ Andrew Howroyd, Feb 03 2024

Formula

T(n,k) = A322093(n,k) / k!. - Andrew Howroyd, Feb 03 2024

A110706 Number of linear arrangements of n blue, n red and n green items such that there are no adjacent items of the same color.

Original entry on oeis.org

1, 6, 30, 174, 1092, 7188, 48852, 339720, 2403588, 17236524, 124948668, 913820460, 6732898800, 49918950240, 372104853600, 2786716100592, 20955408717396, 158149624268220, 1197390368733804, 9091866006950892, 69214297980023256, 528150412279712856
Offset: 0

Views

Author

Max Alekseyev, Aug 04 2005

Keywords

Comments

The number of circular arrangements is given by A110707 and A110710.

Crossrefs

Programs

  • Magma
    [2*(&+[Binomial(n-1, k)*(Binomial(n-1, k)*Binomial(2*n+1-2*k, n+1) + Binomial(n-1, k+1)*Binomial(2*n-2*k, n+1)): k in [0..Floor(n/2)]]): n in [1..25]]; // G. C. Greubel, Nov 24 2018
    
  • Maple
    a:= proc(n) option remember; `if`(n<2, 1+5*n,
          ((7*n-4)*a(n-1)+8*(n-2)^2*a(n-2)/(n+1))/n)
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Sep 09 2023
  • Mathematica
    Table[2*(Sum[Binomial[n-1,k]*(Binomial[n-1,k]*Binomial[2n+1-2k, n+1]+Binomial[n-1,k+1]*Binomial[2n-2k,n+1]),{k,0,Floor[n/2]}]),{n,1,20}] (* Vaclav Kotesovec, Oct 18 2012 *)
    Table[2 (Binomial[2 n + 1, n + 1] HypergeometricPFQ[{1 - n, 1 - n, 1/2 - n/2, -(n/2)}, {1, -(1/2) - n, -n}, 1] + (n - 1) Binomial[2 n, n + 1] HypergeometricPFQ[{1 - n, 2 - n, 1/2 - n/2, 1 - n/2}, {2, 1/2 - n, -n}, 1]), {n, 10}] (* Eric W. Weisstein, May 26 2017 *)
    RecurrenceTable[{n(n+1)*a[n] == (n+1)*(7*n-4)*a[n-1] +8*(n-2)^2*a[n-2], a[1]==6, a[2]==30}, a, {n, 10}] (* Eric W. Weisstein, May 27 2017 *)
  • PARI
    a(n)=2*sum(k=0,n\2,binomial(n-1,k)*(binomial(n-1,k)*binomial(2*n+1-2*k,n+1)+binomial(n-1,k+1)*binomial(2*n-2*k,n+1)))
    
  • Sage
    [2*sum(binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1) + binomial(n-1, k+1)*binomial(2*n-2*k, n+1))  for k in range(1+floor(n/2))) for n in (1..25)] # G. C. Greubel, Nov 24 2018

Formula

a(n) = 2 *( Sum_{k=0..floor(n/2)} binomial(n-1, k) * ( binomial(n-1, k) * binomial(2n+1-2k, n+1) + binomial(n-1, k+1)*binomial(2n-2k, n+1)) ).
a(n) = ((3*n-1)*A000172(n-1) + (3*n+2)*A000172(n))/(n+1).
D-finite with recurrence: n*(n+1)*a(n) = (n+1)*(7*n-4)*a(n-1) + 8*(n-2)^2*a(n-2). - Vaclav Kotesovec, Oct 18 2012
a(n) ~ 9*sqrt(3)*2^(3*n-2)/(Pi*n). - Vaclav Kotesovec, Oct 18 2012
G.f.: (2-x)*(1-8*x)^(-1/3)*(x+1)^(-2/3)*hypergeom([1/3, 1/3],[1],27*x^2/(8*x-1)/(x+1)^2) + 3*x*(2*x-1)^2*(1-8*x)^(-4/3)*(x+1)^(-8/3) * hypergeom([4/3, 4/3],[2],27*x^2/(8*x-1)/(x+1)^2) - 2. - Mark van Hoeij, May 14 2013
a(n) = 6*A190917(n) for n >= 1. - R. J. Mathar, Nov 01 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 09 2023

A190918 Number of permutations of n copies of 1..4 introduced in order 1..4 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 36, 1721, 94376, 5609649, 351574834, 22875971289, 1530622143864, 104650147201049, 7279277647839552, 513492654638478897, 36647810215955194122, 2641438793287744496337, 191996676519223794534702, 14057702378132873242943289, 1035863834231020871413190808
Offset: 1

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			Some solutions for n=2:
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..3....3....3....3....3....3....3....1....3....3....1....3....3....3....1....3
..4....1....4....2....4....1....2....3....4....4....3....4....1....2....2....4
..2....4....1....4....1....4....4....4....2....2....4....3....4....4....3....2
..4....2....2....3....3....2....1....3....3....1....2....1....3....1....4....4
..3....3....4....1....4....4....3....4....4....4....3....4....4....4....3....1
..1....4....3....4....2....3....4....2....1....3....4....2....2....3....4....3
		

Crossrefs

Column k=4 of A322013.
Cf. A000012 (b=2), A190917 (b=3), A190920 (b=5), A190923 (b=6), A190927 (b=7), A190932 (b=8), A321987 (b=9).

Formula

Conjecture: n^3 *(n-1) *(2*n+1) *(5*n-7) *a(n) -2*(n-1) *(415*n^5 -1026*n^4 +727*n^3 -90*n^2 -98*n +36)*a(n-1) +(1630*n^4 -6387*n^3 +7388*n^2 +111*n -3510) *(n-2)^2 *a(n-2) -162*(3+5*n) *(n-2)^2 *(n-3)^3 *a(n-3)=0. - R. J. Mathar, Nov 01 2015
a(n) ~ 3^(4*n-2) / (Pi*n)^(3/2). - Vaclav Kotesovec, Nov 24 2018

A190920 Number of permutations of n copies of 1..5 introduced in order 1..5 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 329, 163386, 98371884, 66218360625, 47940557125969, 36533294879349056, 28920026907938624194, 23575497690601916022516, 19672658572012343899666292, 16730974132035148942028759656, 14455459908454408519322566567054
Offset: 1

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..3....3....3....3....3....3....3....3....1....3....3....3....3....3....3....3
..4....4....2....1....4....4....4....4....3....4....4....4....1....4....4....4
..1....5....4....4....1....5....3....5....4....5....3....5....4....3....2....5
..5....3....5....2....5....2....4....4....5....2....2....3....5....2....3....2
..2....2....4....3....4....1....5....5....2....4....5....5....4....5....5....5
..5....1....3....5....2....3....1....1....4....3....1....4....2....1....4....4
..3....4....5....4....3....4....5....3....5....5....5....1....5....4....1....3
..4....5....1....5....5....5....2....2....3....1....4....2....3....5....5....1
		

Crossrefs

Column k=5 of A322013.
Cf. A000012 (b=2), A190917 (b=3), A190918 (b=4), A190923 (b=6), A190927 (b=7), A190932 (b=8), A321987 (b=9).

Formula

a(n) ~ 25 * sqrt(5) * 2^(10*n-7) / (27 * Pi^2 * n^2). - Vaclav Kotesovec, Nov 24 2018

A190923 Number of permutations of n copies of 1..6 introduced in order 1..6 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 3655, 22831355, 182502973885, 1681287695542855, 16985819072511102549, 183095824753841610373405, 2070756746775910218326948065, 24302858067615766089801166488125, 293736218147318801678882792470437721
Offset: 1

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..3....3....3....3....3....3....3....3....3....3....3....3....3....3....3....3
..4....2....4....4....4....2....4....4....4....4....4....4....4....4....4....4
..5....4....5....5....5....4....1....5....5....2....5....1....5....5....1....3
..1....5....4....3....3....1....3....4....2....5....6....4....6....6....5....4
..4....6....2....2....6....4....5....5....4....6....1....5....3....2....2....2
..5....3....1....6....5....5....6....1....5....5....5....6....2....6....6....5
..2....5....6....5....6....3....5....6....3....3....3....2....6....3....3....1
..6....6....5....6....2....6....4....3....6....4....6....5....4....1....6....6
..3....1....6....1....1....5....2....6....1....1....2....6....5....4....5....5
..6....4....3....4....4....6....6....2....6....6....4....3....1....5....4....6
		

Crossrefs

Column k=6 of A322013.
Cf. A000012 (b=2), A190917 (b=3), A190918 (b=4), A190920 (b=5), A190927 (b=7), A190932 (b=8), A321987 (b=9).

Formula

a(n) ~ 9 * 5^(6*n-2) / (128 * sqrt(2) * Pi^(5/2) * n^(5/2)). - Vaclav Kotesovec, Nov 24 2018

A190927 Number of permutations of n copies of 1..7 introduced in order 1..7 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 47844, 4420321081, 551248360550999, 81644850343968535401, 13519747358522016160671387, 2421032324142610480402567434373, 459408385876250801291447710561829082, 91155245844064069307740171414201519055298
Offset: 1

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			Some solutions for n=2:
  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2
  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
  4  4  4  4  4  2  2  4  4  4  2  4  4  4  4  2
  5  5  5  1  5  4  4  2  5  5  4  2  1  3  2  1
  6  6  6  5  6  5  3  5  3  6  5  4  4  5  5  4
  2  7  4  6  7  6  5  6  6  3  6  5  5  6  6  5
  7  3  5  4  2  3  6  5  7  7  7  1  6  4  4  6
  5  4  2  2  1  5  7  6  2  6  3  6  7  5  7  7
  6  5  6  3  6  4  5  1  4  1  7  3  2  7  1  3
  4  6  1  5  7  7  7  3  7  7  5  7  5  2  7  4
  3  2  7  7  5  1  1  7  1  5  1  6  7  1  5  6
  7  7  3  6  4  6  6  4  5  4  6  5  6  7  6  7
  1  1  7  7  3  7  4  7  6  2  4  7  3  6  3  5
		

Crossrefs

Column k=7 of A322013.
Cf. A000012 (b=2), A190917 (b=3), A190918 (b=4), A190920 (b=5), A190923 (b=6), A190932 (b=8), A321987 (b=9).

Formula

a(n) ~ 343 * sqrt(7) * 2^(7*n-8) * 3^(7*n-3) / (625 * Pi^3 * n^3). - Vaclav Kotesovec, Nov 24 2018

A190932 Number of permutations of n copies of 1..8 introduced in order 1..8 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 721315, 1133879136649, 2536823683737613858, 6945222145021508480249929, 21671513613423101256198918372909, 74115215422015289392187745053216373265, 271259741131895052775392614041761701799270286
Offset: 1

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..1....3....3....1....1....1....3....1....3....3....1....1....1....1....3....1
..3....1....1....3....3....3....1....3....1....1....3....3....3....3....1....2
..4....4....4....4....4....4....4....4....2....4....4....4....4....4....4....3
..5....5....5....3....5....5....5....5....3....5....5....5....2....5....5....4
..6....4....3....5....6....6....6....4....4....3....4....6....5....6....2....5
..5....6....6....6....7....7....2....6....5....6....5....7....6....5....6....6
..6....7....7....7....5....2....3....7....6....5....6....8....7....7....7....7
..3....8....8....8....6....8....5....8....7....2....7....7....5....8....3....8
..2....5....2....7....8....6....7....3....4....7....2....5....8....3....8....3
..7....2....6....8....2....3....6....6....6....6....6....2....3....6....4....5
..8....8....7....4....3....4....8....5....8....7....7....3....7....4....6....7
..4....3....4....6....4....5....7....8....5....8....8....4....4....2....7....4
..8....7....5....5....8....8....8....2....7....4....3....8....8....7....8....8
..7....6....8....2....7....7....4....7....8....8....8....6....6....8....5....6
		

Crossrefs

Formula

a(n) ~ 2 * 7^(8*n-2) / (1215 * sqrt(3) * Pi^(7/2) * n^(7/2)). - Vaclav Kotesovec, Nov 24 2018

A321987 Number of permutations of n copies of 1..9 introduced in order 1..9 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 12310199, 372419001449076, 16904301142107043464659, 967335448974819561548523580438, 64311863997340571475504065539218471107, 4749303210651587675797285013227098386984170468, 379065045836307787068046364731543393514652159389593652
Offset: 1

Views

Author

Seiichi Manyama, Nov 23 2018

Keywords

Crossrefs

Formula

a(n) ~ 2187 * 2^(27*n-14) / (84035 * Pi^4 * n^4). - Vaclav Kotesovec, Nov 24 2018

A209349 Number A(n,k) of initially rising meander words, where each letter of the cyclic k-ary alphabet occurs n times; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 5, 1, 0, 1, 1, 1, 9, 29, 1, 0, 1, 1, 1, 11, 100, 182, 1, 0, 1, 1, 1, 16, 182, 1225, 1198, 1, 0, 1, 1, 1, 19, 484, 3542, 15876, 8142, 1, 0, 1, 1, 1, 25, 902, 17956, 76258, 213444, 56620, 1, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 06 2012

Keywords

Comments

In a meander word letters of neighboring positions have to be neighbors in the alphabet, where in a cyclic alphabet the first and the last letters are considered neighbors too. The words are not considered cyclic here.
A word is initially rising if it is empty or if it begins with the first letter of the alphabet that can only be followed by the second letter in this word position.
A(n,k) is also the number of (n*k-1)-step walks on k-dimensional cubic lattice from (1,0,...,0) to (n,n,...,n) with positive unit steps in all dimensions such that the indices of dimensions used in consecutive steps differ by 1 or are in the set {1,k}.

Examples

			A(0,0) = A(0,k) = A(n,0) = 1: the empty word.
A(1,1) = 1 = |{a}|.
A(2,1) = 0 = |{ }|.
A(2,2) = 1 = |{abab}|.
A(2,3) = 5 = |{abacbc, abcabc, abcacb, abcbac, abcbca}|.
A(1,4) = 1 = |{abcd}|.
A(2,4) = 9 = |{ababcdcd, abadcbcd, abadcdcb, abcbadcd, abcbcdad, abcdabcd, abcdadcb, abcdcbad, abcdcdab}|.
Square array A(n,k) begins:
1,  1,  1,    1,      1,       1,        1, ...
1,  1,  1,    1,      1,       1,        1, ...
1,  0,  1,    5,      9,      11,       16, ...
1,  0,  1,   29,    100,     182,      484, ...
1,  0,  1,  182,   1225,    3542,    17956, ...
1,  0,  1, 1198,  15876,   76258,   749956, ...
1,  0,  1, 8142, 213444, 1753522, 33779344, ...
		

Crossrefs

Rows n=0+1, 2-3 give: A000012, A209350, A240954.
Columns k=0+2, 3-7 give: A000012, A190917 = A110706/6, A060150 = A088218^2, A209351, A209352, A209353.

Programs

  • Maple
    b:= proc() option remember; local n; n:= nargs;
         `if`({args}={0}, 1,
           `if`(args[2]>0, b(args[2]-1, args[i]$i=3..n, args[1]), 0)+
           `if`(n>2 and args[n]>0, b(args[n]-1, args[i]$i=1..n-1), 0))
        end:
    A:= (n, k)-> `if`(n<2, 1, `if`(k<2, 1-k, b((n-1)$2, n$(k-2)))):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[args_List] := b[args] = Module[{n = Length[args]}, If[Union[args] == {0}, 1, If[args[[2]] > 0, b[Join[{args[[2]] - 1}, args[[3 ;; n]], { args[[1]]}]], 0] + If[n > 2 && args[[n]] > 0, b[Join[{args[[n]] - 1}, args[[1 ;; n - 1]]]], 0]]]; A[n_, k_] := If[n < 2, 1, If[k < 2, 1 - k, b[Join[{n - 1, n - 1}, Array[n&, k - 2]]]]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jan 21 2015, after Alois P. Heinz *)

A199126 Number of nX1 0..2 arrays with values 0..2 introduced in row major order, the number of instances of each value within one of each other, and no element equal to any horizontal or vertical neighbor.

Original entry on oeis.org

1, 1, 1, 3, 6, 5, 19, 37, 29, 124, 240, 182, 834, 1614, 1198, 5746, 11137, 8142, 40336, 78332, 56620, 287358, 559134, 400598, 2071558, 4038130, 2872754, 15079270, 29443040, 20824778, 110653854, 216379650, 152303410, 817542980, 1600817660
Offset: 1

Views

Author

R. H. Hardin Nov 03 2011

Keywords

Comments

Column 1 of A199133

Examples

			All solutions for n=5
..0....0....0....0....0....0
..1....1....1....1....1....1
..2....2....2....0....2....0
..0....1....0....2....1....1
..2....2....1....1....0....2
		

Formula

Conjecture: a(3n) = A190917(n). - R. J. Mathar, Nov 01 2015
Showing 1-10 of 10 results.