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: Stefan Hollos

Stefan Hollos's wiki page.

Stefan Hollos has authored 9 sequences.

A283615 Irregular triangle read by rows: T(n,k) is the number of necklaces of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 5, 4, 2, 1, 2, 7, 16, 18, 12, 4, 1, 2, 11, 32, 70, 92, 82, 40, 10, 1, 2, 13, 56, 166, 348, 510, 520, 350, 140, 26, 1, 2, 17, 88, 336, 932, 1948, 2992, 3404, 2756, 1518, 504, 80, 1, 2, 19, 124, 584, 2056, 5524, 11444, 18298, 22428, 20706, 13944, 6468, 1848, 246, 1, 2, 23, 168, 944, 3976, 13120, 34064, 70380, 115516
Offset: 0

Author

Stefan Hollos, Apr 11 2017

Keywords

Comments

T(n,k) is the number of unique circular arrays (A283614) given equivalence under rotation.

Examples

			Table for n=[0..6], k=[0..12]
    0 1  2   3    4     5     6      7      8       9      10      11      12
-----------------------------------------------------------------------------
0 | 1
1 | 1 2  1
2 | 1 2  5   4    2
3 | 1 2  7  16   18    12     4
4 | 1 2 11  32   70    92    82     40     10
5 | 1 2 13  56  166   348   510    520    350     140      26
6 | 1 2 17  88  336   932  1948   2992   3404    2756    1518     504      80
The 13 necklaces for n=5, k=2 are:
[+-+-+-+-0+0-],[+-+-+-+0+-0-],[+-+-+-+0-+0-],[+-+-+-0+-+0-]
[+-+-+0+-+-0-],[+-+-+0-+-+0-],[+-+-+-+-+0-0],[+-+-+-+-0+-0]
[+-+-+-+-0-+0],[+-+-+-+0-+-0],[+-+-+-0+-+-0],[+-+-+-0-+-+0]
[+-+-+0-+-+-0].
		

Crossrefs

Programs

  • Maxima
    g(x,y):=2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1;
    A283614(n,k):=coeff(limit(diff(g(x,y),y,n)/n!,y,0),x,k);
    A283615(n,k):=block([s,d],
      s:0,
      for d in divisors(gcd(n,k)) do
        s:s+totient(d)*A283614(n/d,k/d),
      return(s/(2*n+k)));

Formula

T(n,k) = Sum_{d|gcd(n,k)} phi(d) * A283614(n/d,k/d) / (2*n+k) where phi is Euler's totient function (A000010).
T(n,2*n) = A003239(n).
T(n,2*n-1) = 2*binomial(2*(n-1), n-1).
T(n,n) = A110710(n).

A283614 T(n,k) = number of circular arrays of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.

Original entry on oeis.org

1, 2, 6, 4, 2, 10, 24, 28, 12, 2, 14, 56, 132, 180, 132, 40, 2, 18, 100, 352, 804, 1196, 1120, 600, 140, 2, 22, 156, 728, 2324, 5196, 8160, 8840, 6300, 2660, 504, 2, 26, 224, 1300, 5320, 15844, 34872, 56848, 67900, 57820, 33264, 11592, 1848, 2, 30, 304, 2108, 10512, 39064, 110480, 240288, 402556, 515844, 496944, 348600
Offset: 0

Author

Stefan Hollos, Apr 01 2017

Keywords

Comments

The array is circular in the sense that the first and last elements are adjacent.
For linear arrays see A283613.

Examples

			The table starts with columns k=0..10 and rows n=0..5:
  | 0  1   2   3    4    5    6    7    8    9  10
-----------------------------------------------------------------
0 | 1
1 | 2  6   4
2 | 2 10  24  28   12
3 | 2 14  56 132  180  132   40
4 | 2 18 100 352  804 1196 1120  600  140
5 | 2 22 156 728 2324 5196 8160 8840 6300 2660 504
For n=2, k=3, the 28 arrays are:
[+0-0+0-] [+0+0-0-] [0-+0+0-] [0-0+0+-]
[0+-0+0-] [0+0-+0-] [0+0-0+-] [0+0+-0-]
[-0-0+0+] [-0+0-0+] [0-+0-0+] [0-0-+0+]
[0-0+-0+] [0-0+0-+] [0+-0-0+] [0+0-0-+]
[-+0-0+0] [-+0+0-0] [-0-+0+0] [-0+-0+0]
[-0+0-+0] [-0+0+-0] [+-0-0+0] [+-0+0-0]
[+0-+0-0] [+0-0-+0] [+0-0+-0] [+0+-0-0]
		

Crossrefs

Programs

  • Mathematica
    nmax=8; Flatten[CoefficientList[Series[CoefficientList[Series[2*(x*y + 1)/Sqrt[(1 - y)*(1 - (2*x + 1)^2*y)] - 1, {y, 0, nmax }], y], {x, 0, 2nmax + 1 }], x]] (* Indranil Ghosh, Apr 02 2017 *)

Formula

G.f.: 2*(x*y+1)/sqrt((1-y)*(1-(2*x+1)^2*y))-1.
T(n,0) G.f.: (1+y)/(1-y).
T(n,1) G.f.: 2*y*(3-y)/(1-y)^2.
T(n,2) G.f.: 4*y*(1+3*y-y^2)/(1-y)^3.
T(n,3) G.f.: 4*y^2*(1+y)*(7-2*y)/(1-y)^4.
T(n,4) G.f.: 4*y^2*(3+30*y+6*y^2-4*y^3)/(1-y)^5.
T(n,5) G.f.: 4*y^3*(33+101*y-8*y^3)/(1-y)^6.
T(n,n) = A110707(n).
T(n,2*n) = 2*binomial(2*n,n).
Sum_{2*n+k = m} T(n,k) = A265118(m), m > 3.

A283613 T(n,k) = number of linear arrays of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.

Original entry on oeis.org

1, 1, 2, 6, 6, 2, 2, 12, 30, 38, 24, 6, 2, 18, 74, 174, 248, 212, 100, 20, 2, 24, 138, 480, 1092, 1668, 1700, 1110, 420, 70, 2, 30, 222, 1026, 3228, 7188, 11492, 13140, 10500, 5572, 1764, 252, 2, 36, 326, 1882, 7580, 22274, 48852, 80672, 100044, 91840, 60564, 27132, 7392, 924, 2, 42, 450, 3118, 15324, 56040, 156664, 339720, 574716, 757148, 769356, 591444, 332640, 129096, 30888, 3432, 2, 48, 594, 4804, 27888, 122136, 415576, 1118268, 2403588, 4143116, 5719788, 6281856, 5416488, 3586968, 1760616, 603174, 128700, 12870
Offset: 0

Author

Stefan Hollos, Mar 11 2017

Keywords

Examples

			The table starts with columns k=0...11 and rows n=0...5:
  | 0   1   2    3    4    5     6     7     8    9   10  11
-----------------------------------------------------------
0 | 1   1
1 | 2   6   6    2
2 | 2  12  30   38   24    6
3 | 2  18  74  174  248  212   100    20
4 | 2  24 138  480 1092 1668  1700  1110   420   70
5 | 2  30 222 1026 3228 7188 11492 13140 10500 5572 1764 252
For n=2, k=4 the 24 arrays are:
[-1,0,-1,0,1,0,1,0]  [-1,0,1,0,-1,0,1,0]  [-1,0,1,0,1,0,-1,0]  [1,0,-1,0,-1,0,1,0]
[1,0,-1,0,1,0,-1,0]  [1,0,1,0,-1,0,-1,0]  [0,-1,1,0,-1,0,1,0]  [0,-1,1,0,1,0,-1,0]
[0,-1,0,-1,1,0,1,0]  [0,-1,0,-1,0,1,0,1]  [0,-1,0,1,-1,0,1,0]  [0,-1,0,1,0,-1,1,0]
[0,-1,0,1,0,-1,0,1]  [0,-1,0,1,0,1,-1,0]  [0,-1,0,1,0,1,0,-1]  [0,1,-1,0,-1,0,1,0]
[0,1,-1,0,1,0,-1,0]  [0,1,0,-1,1,0,-1,0]  [0,1,0,-1,0,-1,1,0]  [0,1,0,-1,0,-1,0,1]
[0,1,0,-1,0,1,-1,0]  [0,1,0,-1,0,1,0,-1]  [0,1,0,1,-1,0,-1,0]  [0,1,0,1,0,-1,0,-1]
		

Crossrefs

Programs

  • Mathematica
    nmax=8; Flatten[CoefficientList[Series[CoefficientList[Series[((x + 1)^2*Sqrt[(1 - y)/(1 - (2x + 1)^2*y)] - x - 1)/x, {y, 0, nmax}], y], {x, 0, 2nmax + 1}], x]] (* Indranil Ghosh, Mar 22 2017 *)

Formula

G.f.:((x+1)^2*sqrt((1-y)/(1-(2*x+1)^2*y))-x-1)/x.
T(n,0) G.f.: (1+y)/(1-y).
T(n,1) G.f.: (y^2 + 4*y + 1)/(1-y)^2.
T(n,2) G.f.: 2*y*(y^2 + 6*y + 3)/(1-y)^3.
T(n,3) G.f.: 2*y*(2*y^3 + 17*y^2 + 15*y + 1)/(1-y)^4.
T(n,4) G.f.: 4*y^2*(2*y^3 + 23*y^2 + 32*y + 6)/(1-y)^5.
T(n,5) G.f.: 2*y^2*(8*y^4 + 120*y^3 + 243*y^2 + 88*y + 3)/(1-y)^6.
T(n,2*n+1) = binomial(2*n,n).
T(n,2*n) = (n+2)*binomial(2*n,n).
T(n,n) = A110706(n) n > 0.
Sum_{2*n+k = m} T(n,k) = A199697(m).

A277236 Number of strings of length n composed of symbols from the circular list [1,2,3,4] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1 and 3.

Original entry on oeis.org

1, 4, 10, 26, 66, 170, 434, 1114, 2850, 7306, 18706, 47930, 122754, 314474, 805490, 2063386, 5285346, 13538890, 34680274, 88835834, 227556930, 582900266, 1493127986, 3824729050, 9797240994, 25096157194, 64285121170, 164669749946, 421810234626, 1080489234410, 2767730172914
Offset: 0

Author

Stefan Hollos, Oct 06 2016

Keywords

Comments

To generalize to strings composed of symbols from the circular list [1,2,3,...2m], m>=2, with no runs of 2 or more allowed for symbols 1,3,5,...2m-1, use the same recurrence given below with initial values a(1)=2m, a(2)=5m, see A277237 for the m=3 case.

Examples

			For n=3 the 26 strings are 121, 122, 123, 141, 143, 144, 212, 214, 221, 222, 223, 232, 234, 321, 322, 323, 341, 343, 344, 412, 414, 432, 434, 441, 443, 444.
For n=4 the 66 strings are 1212, 1214, 1221, 1222, 1223, 1232, 1234, 1412, 1414, 1432, 1434, 1441, 1443, 1444, 2121, 2122, 2123, 2141, 2143, 2144, 2212, 2214, 2221, 2222, 2223, 2232, 2234, 2321, 2322, 2323, 2341, 2343, 2344, 3212, 3214, 3221, 3222, 3223, 3232, 3234, 3412, 3414, 3432, 3434, 3441, 3443, 3444, 4121, 4122, 4123, 4141, 4143, 4144, 4321, 4322, 4323, 4341, 4343, 4344, 4412, 4414, 4432, 4434, 4441, 4443, 4444.
		

Crossrefs

Cf. A222132 (z1), A277237.

Programs

  • Mathematica
    CoefficientList[Series[(1 + 3 x + 2 x^2)/(1 - x - 4 x^2), {x, 0, 30}], x] (* Michael De Vlieger, Oct 07 2016 *)
    LinearRecurrence[{1,4},{1,4,10},40] (* Harvey P. Dale, Jul 12 2025 *)
  • PARI
    Vec((1+3*z+2*z^2)/(1-z-4*z^2) + O(z^40)) \\ Michel Marcus, Oct 06 2016

Formula

G.f.: (1+3*x+2*x^2)/(1-x-4*x^2).
For n>=3, the recurrence is a(n) = a(n-1) + 4*a(n-2), a(1)=4, a(2)=10.
a(n) = ((13+3*sqrt(17))*z1^n-(13-3*sqrt(17))*z2^n)/(4*sqrt(17)) where z1=(1+sqrt(17))/2 and z2=(1-sqrt(17))/2.

A277237 Number of strings of length n composed of symbols from the circular list [1,2,3,4,5,6] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1, 3 and 5.

Original entry on oeis.org

1, 6, 15, 39, 99, 255, 651, 1671, 4275, 10959, 28059, 71895, 184131, 471711, 1208235, 3095079, 7928019, 20308335, 52020411, 133253751, 341335395, 874350399, 2239691979, 5737093575, 14695861491, 37644235791, 96427681755, 247004624919, 632715351939, 1620733851615
Offset: 0

Author

Stefan Hollos, Oct 06 2016

Keywords

Examples

			For n=2 the 15 strings are: 12, 16, 21, 22, 23, 32, 34, 41, 43, 44, 54, 56, 61, 65, 66.
For n=3 the 39 strings are: 121, 122, 123, 161, 165, 166, 212, 216, 221, 222, 223, 232, 234, 321, 322, 323, 341, 343, 344, 412, 416, 432, 434, 441, 443, 444, 541, 543, 544, 561, 565, 566, 612, 616, 654, 656, 661, 665, 666.
		

Crossrefs

Cf. A277236.

Programs

  • Mathematica
    CoefficientList[Series[(1 + 5 x + 5 x^2)/(1 - x - 4 x^2), {x, 0, 29}], x] (* Michael De Vlieger, Oct 07 2016 *)
  • PARI
    Vec((1+5*x+5*x^2)/(1-x-4*x^2) + O(x^40)) \\ Michel Marcus, Oct 06 2016

Formula

G.f.: (1+5*x+5*x^2)/(1-x-4*x^2).
For n>=3, the recurrence is a(n) = a(n-1) + 4*a(n-2), a(1)=6, a(2)=15.
a(n) = 3*((13+3*sqrt(17))*z1^n-(13-3*sqrt(17))*z2^n)/(8*sqrt(17)), where z1=(1+sqrt(17))/2 and z2=(1-sqrt(17))/2.

A135389 Number of walks of length 2*n+2 from origin to (1,1) in a square lattice.

Original entry on oeis.org

2, 24, 300, 3920, 52920, 731808, 10306296, 147232800, 2127513960, 31031617760, 456164781072, 6749962774464, 100445874620000, 1502052155856000, 22557604697766000, 340044833169460800, 5143178101688094600
Offset: 0

Author

Stefan Hollos (stefan(AT)exstrom.com), Dec 11 2007

Keywords

Comments

a(n) is the number of walks of length 2n+2 in an infinite square lattice that begin at the origin and end at (1,1) using steps (1,0), (-1,0), (0,1), (0,-1).

Examples

			G.f. = 2 + 24*x + 300*x^2 + 3920*x^3 + 731808*x^4 + 10306296*x^5 + ... - _Michael Somos_, Oct 17 2019
		

Crossrefs

Programs

  • Maple
    series( 2*hypergeom([3/2, 3/2],[3],16*x), x=0, 20);  # Mark van Hoeij, Apr 06 2013
  • Mathematica
    Table[Binomial[2n + 2, n] Binomial[2n + 2, n + 1], {n, 0, 19}] (* Alonso del Arte, Apr 06 2013 *)

Formula

a(n) = binomial(2n+2,n) * binomial(2n+2,n+1) = A001791(n+1)*A000984(n+1).
G.f.: 2*2F1(3/2,3/2; 3; 16*x). - Mark van Hoeij, Apr 06 2013
D-finite with recurrence n*(n+2)*a(n) -4*(2*n+1)^2*a(n-1)=0. - R. J. Mathar, Jul 14 2013
E.g.f.: Sum_{n>0} a(n-1) * x^(2*n)/(2*n)! = BesselI(1, 2*x)^2. - Michael Somos, Oct 17 2019

A135394 Number of walks of length 2n+2 from origin to (1,1,0) on a cubic lattice.

Original entry on oeis.org

2, 48, 1200, 31920, 890820, 25768512, 766053288, 23265871200, 718834982580, 22523567008800, 714044153702880, 22861678250567520, 738191825153055000, 24011251877148076800, 786038700362427057600, 25877760367136497398720
Offset: 0

Author

Stefan Hollos (stefan(AT)exstrom.com), Dec 11 2007

Keywords

Comments

a(n) is the number of walks of length 2n+2 on a cubic lattice that begin at the origin and end at (1,1,0) using steps (1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1).

Crossrefs

Cf. A002896.

Programs

  • Mathematica
    Table[Binomial[2*n + 2, n]*Sum[Binomial[n, k]*Binomial[n + 2, k + 1]*Binomial[2*k + 1, k], {k, 0, n}], {n, 0, 25}] (* G. C. Greubel, Oct 12 2016 *)
  • Maxima
    a(n) = binomial(2n+2,n) * sum( binomial(n,k) * binomial(n+2,k+1) * binomial(2k+1,k), k, 0, n )
    
  • PARI
    a(n) = binomial(2*n+2,n) * sum(k=0,n, binomial(n,k) * binomial(n+2,k+1) * binomial(2*k+1,k)) \\ Charles R Greathouse IV, Oct 12 2016

Formula

a(n) = binomial(2n+2,n) * Sum_{k=0..n} ( binomial(n,k) * binomial(n+2,k+1) * binomial(2k+1,k) ).
6*(n+2)^2*a(n) = (n+1)*((7*n+11)*A002896(n+1)-18*(2*n+1)*A002896(n)). - Sergey Perepechko, Feb 08 2011
G.f.: (1/(12*x))*(-2*(4*x-1)*(36*x-1)*x*g'' + (-720*x^2+160*x-3)*g' + (-144*x+18)*g) where g is the o.g.f. of A002896. - Mark van Hoeij, Nov 12 2011
a(n) ~ 3^(7/2) * 36^n / (Pi^(3/2) * n^(3/2)). - Vaclav Kotesovec, Nov 27 2017

A135395 Number of walks of length 2n+3 from origin to (1,1,1) on a cubic lattice.

Original entry on oeis.org

6, 180, 5040, 143640, 4199580, 125621496, 3830266440, 118655943120, 3724872182460, 118248726796200, 3789926661961440, 122473276342326000, 3986235855826497000, 130561182081992667600, 4300094066688571550400
Offset: 0

Author

Stefan Hollos (stefan(AT)exstrom.com), Dec 11 2007

Keywords

Comments

a(n) is the number of walks of length 2*n+3 in a cubic lattice that begin at the origin and end at (1,1,1) using steps (1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1).

Crossrefs

Cf. A002896.

Programs

  • Maple
    sq := (1-40*x+144*x^2)^(1/2); pb := 54*x*(108*x^2-27*x+1+(9*x-1)*sq);
    H1 := hypergeom([7/6,1/3],[1],pb); H2 := hypergeom([1/6,4/3],[1],pb);
    fa := (10-72*x-6*sq)^(1/2)/(432*x^3);
    ogf := fa*((648*x^2-162*x+(54*x+3)*sq+5)*H1^2 - (648*x^2-342*x+(54*x+6)*sq+10)*H1*H2 - (180*x-5-3*sq)*H2^2);
    series(ogf,x=0,20) # Mark van Hoeij, Nov 12 2011
  • Mathematica
    Table[Binomial[2n+3,n]Sum[Binomial[n,k]Binomial[n+3,k+2]Binomial[2k+2,k+1],{k,0,n}],{n,0,20}] (* Harvey P. Dale, Mar 20 2012 *)
  • Maxima
    a(n) = binomial(2n+3,n) * sum( binomial(n,k) * binomial(n+3,k+2) * binomial(2k+2,k+1), k, 0, n )
    
  • PARI
    a(n) = binomial(2*n+3,n) * sum(k=0,n, binomial(n,k) * binomial(n+3,k+2) * binomial(2*k+2,k+1)) \\ Charles R Greathouse IV, Oct 12 2016

Formula

a(n) = binomial(2n+3,n) * Sum_{k=0..n} (binomial(n,k) * binomial(n+3,k+2) * binomial(2k+2,k+1)).
G.f.: ((12*(4*x-1)*(36*x-1)/x)*g'' + (12*(288*x^2-60*x+1)/x^2)*g' + (72*(6*x-1)/x^2)*g)/288 where g is the o.g.f. of A002896. - Mark van Hoeij, Nov 12 2011
From Vaclav Kotesovec, Nov 27 2017: (Start)
Recurrence: n*(n+2)*(n+3)*a(n) = 4*(2*n + 3)*(5*n^2 + 10*n + 3)*a(n-1) - 36*n*(2*n + 1)*(2*n + 3)*a(n-2).
a(n) ~ 2^(2*n + 1) * 3^(2*n + 9/2) / (Pi*n)^(3/2). (End)
a(n) = (2*n+1)*(2*n+3)*binomial(2*n,n)*((n+3)*A005802(n+1)-(n+1)*A005802(n)). - Mark van Hoeij, Nov 12 2023

A135390 Number of walks from origin to (1,0,0) in a cubic lattice.

Original entry on oeis.org

1, 15, 310, 7455, 195426, 5416026, 156061620, 4628393055, 140348412490, 4331544836190, 135614951248140, 4296741195214650, 137507314754659500, 4438467396322843500, 144329729055650881560, 4723733064176346346335
Offset: 0

Author

Stefan Hollos (stefan(AT)exstrom.com), Dec 11 2007

Keywords

Comments

a(n) is the number of walks of length 2n+1 on a cubic lattice that start at the origin and end at (1,0,0) using steps (1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1).

Crossrefs

Cf. A002896.

Programs

  • Mathematica
    f[n_] := Binomial[2 n + 1, n]*Sum[ Binomial[n, k]*Binomial[n + 1, k]*Binomial[2 k, k], {k, 0, n}]; Array[f, 16, 0] (* Robert G. Wilson v *)
  • Maxima
    a(n) = binomial(2*n+1,n) * sum( binomial(n,k) * binomial(n+1,k) * binomial(2*k,k), k, 0, n );

Formula

a(n) = binomial(2*n+1,n) * Sum_{k=0..n} binomial(n,k) * binomial(n+1,k) * binomial(2*k,k).
G.f.: (1/(6*z)) * (1/sqrt(1+12*z)*hypergeom([1/8,3/8],[1],64/81*z*(1+sqrt(1-36*z))^2*(2+sqrt(1-36*z))^4/(1+12*z)^4)*hypergeom([1/8,3/8],[1],64/81*z*(1-sqrt(1-36*z))^2*(2-sqrt(1-36*z))^4/(1+12*z)^4) - 1). - Sergey Perepechko, Jan 31 2011
a(n) = A002896(n+1)/6.