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.
%I A227147 #27 Mar 13 2025 13:27:53 %S A227147 1,1,3,1,2,4,3,2,3,4,2,3,5,4,4,3,4,5,4,3,4,4,5,3,4,6,5,5,5,4,5,6,5,5, %T A227147 4,5,5,6,5,4,5,5,5,6,4,5,7,6,6,6,6,5,6,7,6,6,6,5,6,6,7,6,6,5,6,6,6,7, %U A227147 6,5,6,6,6,6,7,5,6,8,7,7,7,7,7,6,7,8,7 %N A227147 Irregular table: palindromic subsections from the rows of array A227141 related to main trunks of game trees drawn for Bulgarian solitaire. %C A227147 Each row n contains A002061(n) terms and is palindromic. %C A227147 Apart from the last term, each term on row n gives the largest summand in the partitions encountered on the main trunk of the Bulgarian solitaire tree computed for the deck of n(n+1)/2 cards; from row 2 onward, the last term of row k is one less than the largest summand in the unordered triangular partition {1+2+...+k} that is at the root of each game tree of the deck of the same size. The function f(n) = A227185(A227452(n)) would correctly give the largest summand sizes also for those cases. %D A227147 Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001. %H A227147 Antti Karttunen, <a href="/A227147/b227147.txt">The rows 1..31 of the table, flattened</a> %H A227147 Ethan Akin and Morton Davis, <a href="http://www.jstor.org/stable/2323643">"Bulgarian solitaire"</a>, American Mathematical Monthly 92 (4): 237-250. (1985). %F A227147 a(n) = A227141(A227177(n),A227181(n)). [As a sequence. Each row n is a subsequence from the section [n,n^2] of the n-th row of ordinary table A227141.] %F A227147 ;; The following two formulas use the table A227452: %F A227147 a(n) = A227185(A227452(n)) - ([n>1] * (A227177(n+1) - A227177(n))). [Where the expression [n>1] is an instance of Iverson brackets] %F A227147 a(n) = n when n<2, otherwise a(n) = A005811(A227452(n-1)). %F A227147 For all n, a(n) = a(A227182(n)). [This is just a claim that each row is symmetric.] %e A227147 Rows 1-6 of the table are: %e A227147 1 %e A227147 1, 3, 1 %e A227147 2, 4, 3, 2, 3, 4, 2 %e A227147 3, 5, 4, 4, 3, 4, 5, 4, 3, 4, 4, 5, 3 %e A227147 4, 6, 5, 5, 5, 4, 5, 6, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 4 %e A227147 5, 7, 6, 6, 6, 6, 5, 6, 7, 6, 6, 6, 5, 6, 6, 7, 6, 6, 5, 6, 6, 6, 7, 6, 5, 6, 6, 6, 6, 7, 5 %o A227147 (Scheme) (define (A227147 n) (A227141bi (A227177 n) (A227181 n))) ;; A227141bi given in A227141. %o A227147 (Scheme) (define (A227147v2 n) (- (A227185 (A227452 n)) (* (if (> n 1) 1 0) (- (A227177 (+ n 1)) (A227177 n))))) %o A227147 (Scheme) (define (A227147v3 n) (if (< n 2) n (A005811 (A227452 (- n 1))))) %Y A227147 Cf. A227141, A227452, A227185, A227181, A227182. %K A227147 nonn,tabf %O A227147 1,3 %A A227147 _Antti Karttunen_, Jul 03 2013