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 11-14 of 14 results.

A141148 Number of aperiodic ternary necklaces with n beads of each color and no adjacent beads of the same color.

Original entry on oeis.org

2, 3, 14, 65, 346, 1929, 11442, 70310, 445928, 2896239, 19186738, 129184583, 881808726, 6089840427, 42482905678, 298976072384, 2120377458898, 15141288786096, 108784152585234, 785869928763325, 5705406374237814
Offset: 1

Views

Author

Max Alekseyev, Jun 10 2008

Keywords

Crossrefs

Formula

a(n) = Sum_{d|n} moebius(n/d) * A141147(d) / n.

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

Views

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).

A143381 Number of Hi-Lo arrangements HL(m,n) of a deck with n suits and m ranks in each suit, m>=1, n>=1.

Original entry on oeis.org

0, 2, 0, 6, 2, 0, 14, 30, 2, 0, 78, 230, 174, 2, 0, 230, 14094, 4834, 1092, 2, 0, 1902, 187106, 3785126, 114442, 7188, 2, 0, 6902, 26185806, 250560122, 1225289412, 2908990, 48852, 2, 0, 76110, 557115782, 682502468094, 423419180642
Offset: 1

Views

Author

Max Alekseyev, Aug 11 2008, Aug 17 2008

Keywords

Comments

In High-Low card game, a card is turned over (from the top of a regular shuffled 52-card deck) and the player is asked to guess if the next card will be higher or lower than the one shown. A simple strategy to play the game would be to guess 'High' if the card is an Ace through 6 (consider Ace to be of rank 1), 'Low' if the card is 8 through 13 (King) and flip a coin if the card is a 7. Intuitively, the player is playing the best he can without memory. If we make the assumption that the player always gets the random coin flips correct, then the probability that he will get every turn correct through the entire deck equals HL(13,4)*4!^13/52! (~= 1.7*10^(-7)) where HL(m,n) is defined below.
Given a deck with n suits each ranked from 1 to m (for a total of mn cards in the deck), a Hi-Lo arrangement of the cards is an arrangement of ranks r(1),r(2),...,r(mn) that satisfies the following three properties: (i) if r(i) < (m+1)/2 then r(i+1) > r(i); (ii) if r(i) > (m+1)/2 then r(i+1) < r(i); and (iii) if r(i) = (m+1)/2 then r(i+1) is different from r(i). The number of Hi-Lo arrangements of a deck with m ranks and n suits is denoted HL(m,n).

Examples

			The table of values HL(m,n) starts:
0 0 0 0 0 0 0 ...
2 2 2 2 2 2 2 ...
6 30 174 1092 7188 48852 339720 ...
14 230 4834 114442 2908990 77538470 2138286650 ...
78 14094 3785126 1225289412 442227602892 171398421245988 69859403814893544 ...
...
		

Crossrefs

Rows: A000004, A007395, A110706. Bisection of the first column: HL(2m, 1) = A048163(m+1).

Programs

  • PARI
    \r nseqadj.gp
    { f(m,n,k) = sum(j=0, k, (-1)^j * binomial(k,j) * binomial(k-j,n)^m ) }
    { HL0(m,n) = 2 * sum(k=n, (m/2)*n, f(m/2,n,k) * (f(m/2,n,k) + f(m/2,n,k+1)) ) } \\ for even m
    { HL1(m,n) = sum(i=n, (m\2)*n, f(m\2,n,i) * sum(j=n, (m\2)*n, f(m\2,n,j) * M([n,i,j]) )) } \\ for odd m
    { HL(m,n) = if(m%2, HL1(m,n), HL0(m,n) ) }

A365511 Number of ways to travel from (0,0,0) to (2*n,2*n,2*n) with n positive integer steps in each direction, changing directions at each step.

Original entry on oeis.org

1, 6, 810, 174000, 46819500, 14378702688, 4817350825056, 1716615248325120, 640480159385995500, 247630745402467284000, 98500241916182188189536, 40099260132768751505660160, 16642069286080355216946537600, 7020218653006514588616480000000, 3002947242700351209440983200000000
Offset: 0

Views

Author

Greg Dresden and Snezhana Tuneska, Sep 07 2023

Keywords

Comments

Rotations or reflections are counted as different paths. For example, when n=1 then there are six paths from (0,0,0) to (2,2,2) using one step in each direction; these six paths would correspond to the six permutations of x,y,z, which are xyz, xzy, yxz, yzx, zxy, zyx. If we discount rotations then there would be just two paths: xyz and xzy. If we discount reflections, there would be just one path: xyz.

Examples

			For n=2, we consider all possible paths from (0,0,0) to (4,4,4) involving two steps in each coordinate direction. We can begin this count by considering all the ways to arrange two x's, two y's, and two z's without consecutive terms; there are 30 such ways because A110706(2) = 30. Then, for the two x's which represent the two steps in the x-direction, they need to add up to 4 and there are three such ways (1+3, 2+2, and 3+1). Likewise there are three ways for the y's and likewise three ways for the z's. Hence, in total, we have 3*3*3*30 = 810 ways to move from (0,0,0) to (4,4,4) with two steps in each direction with no two consecutive steps in same direction.
		

Crossrefs

Formula

a(n) = A088218(n)^3 * A110706(n).
Previous Showing 11-14 of 14 results.