|
|
A037481
|
|
Base 4 digits are, in order, the first n terms of the periodic sequence with initial period 1,2.
|
|
15
|
|
|
0, 1, 6, 25, 102, 409, 1638, 6553, 26214, 104857, 419430, 1677721, 6710886, 26843545, 107374182, 429496729, 1717986918, 6871947673, 27487790694, 109951162777, 439804651110, 1759218604441, 7036874417766, 28147497671065
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The terms have a particular pattern in their binary expansion, which encodes for a "triangular partition" when runlength encoding of unordered partitions are used (please see A129594 for how that encoding works).
n a(n) same in binary run lengths unordered partition
0 0 0 [] {}
1 1 1 [1] {1}
2 6 110 [2,1] {1+2}
3 25 11001 [2,2,1] {1+2+3}
4 102 1100110 [2,2,2,1] {1+2+3+4}
5 409 110011001 [2,2,2,2,1] {1+2+3+4+5}
6 1638 11001100110 [2,2,2,2,2,1] {1+2+3+4+5+6}
7 6553 1100110011001 [2,2,2,2,2,2,1] {1+2+3+4+5+6+7}
8 26214 110011001100110 [2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8}
9 104857 11001100110011001 [2,2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8+9}
These partitions are the only fixed points of "Bulgarian Solitaire" operation (see Gardner reference or Wikipedia page), and thus the terms of this sequence give the fixed points for A226062 which implements that operation (using the same encoding for partitions). This also implies that these partitions are the roots of the game trees constructed for decks consisting of 1+2+3+...+k cards. See A227451 for the encoding of the corresponding tops of the main trunks of the same trees. - Antti Karttunen, Jul 12 2013
|
|
REFERENCES
|
Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2*x+1) / ((x-1)*(x+1)*(4*x-1)). - Colin Barker, Apr 30 2014
|
|
MATHEMATICA
|
Module[{nn=30, ps}, ps=PadRight[{}, nn, {1, 2}]; Table[FromDigits[Take[ps, n], 4], {n, 0, nn}]] (* Harvey P. Dale, Jul 18 2013 *)
|
|
PROG
|
(Magma) I:=[0, 1, 6]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 21 2012
(PARI) concat(0, Vec(x*(2*x+1)/((x-1)*(x+1)*(4*x-1)) + O(x^100))) \\ Colin Barker, Apr 30 2014
(PARI) a(n) = 2<<(2*n) \ 5; \\ Kevin Ryde, Jun 24 2023
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|