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.

A188160 For an unordered partition of n with k parts, remove 1 from each part and append the number k to get a new partition until a partition is repeated. a(n) gives the maximum steps to reach a period considering all unordered partitions of n.

This page as a plain text file.
%I A188160 #20 Jun 03 2018 03:49:33
%S A188160 0,1,2,4,5,6,7,8,10,12,12,12,13,18,20,20,17,18,21,28,30,30,24,24,25,
%T A188160 32,40,42,42,35,31,32,36,45,54,56,56,48,40,40,41,50,60,70,72,72,63,54,
%U A188160 49,50,55,66,77,88,90,90,80,70,60,60,61
%N A188160 For an unordered partition of n with k parts, remove 1 from each part and append the number k to get a new partition until a partition is repeated. a(n) gives the maximum steps to reach a period considering all unordered partitions of n.
%C A188160 Alternatively, if one iteratively removes the largest part z(1) and adds 1 to the next z(1) parts to get a new partition until a partition recurs, one gets the same maximum number of steps to reach a period.
%C A188160 The two shuffling operations are isomorphic for unordered partitions.
%C A188160 The two operations have the same length and number of periods for ordered and unordered partitions.
%C A188160 The steps count the operations including any pre-periodic part up to the end of first period, that is, the number of distinct partitions without including the first return.
%D A188160 R. Baumann LOG IN, 4 (1987)
%D A188160 Halder, Heise Einführung in Kombinatorik, Hanser Verlag (1976) 75 ff.
%H A188160 Ethan Akin, Morton Davis, <a href="http://www.jstor.org/stable/2323643">Bulgarian solitaire</a>, Am. Math. Monthly 92 (4) (1985) 237-250
%H A188160 J. Brandt, <a href="http://dx.doi.org/10.1090/S0002-9939-1982-0656129-5">Cycles of partitions</a>, Proc. Am. Math. Soc. 85 (3) (1982) 483-486
%F A188160 a((k^2+k-2)/2-j) = k^2-k-2-(k+1)*j with 0<=j<=(k-4)/2  and 4<=k.
%F A188160 a((k^2+k+2)/2+j) = k^2-k-k*j with 0<=j<=(k-4)/2 and 4<=k,
%F A188160 a((k^2+2*k-(k mod 2))/2+j) = (k^2+2*k-(k mod 2))/2+j  with 0 <= j <= 1 and 2 <= k.
%F A188160 a(T(k)) = 2*T(k-1) = k^2-k with 1 <= k for the triangular numbers T(k)=A000217(k).
%e A188160 For k=6 and 0 <= j <= 1:
%e A188160 a(19)=21;  a(20)=28;  a(21)=30;  a(22)=30;  a(23)=24;  a(24)=24;  a(25)=25.
%e A188160 For n=4: (1+1+1+1)->(4)->(3+1)->(2+2)->(2+1+1)--> a(4)=4.
%e A188160 For n=5: (1+1+1+1+1)->(5)->(4+1)->(3+2)->(2+2+1)->(3+1+1)-->a(5)=5.
%p A188160 A188160 := proc(n)
%p A188160         local k,j,T ;
%p A188160         if n <= 2 then
%p A188160                 return n-1 ;
%p A188160         end if;
%p A188160         for k from 0 do
%p A188160                 T := k*(k+1) /2 ;
%p A188160                 if n = T and k >= 1 then
%p A188160                         return k*(k-1) ;
%p A188160                 end if;
%p A188160                 if k>=4 then
%p A188160                         j := T-1-n ;
%p A188160                         if j>= 0 and j <= (k-4)/2 then
%p A188160                                 return k^2-k-2-(k+1)*j ;
%p A188160                         end if;
%p A188160                         j := n-T-1 ;
%p A188160                         if j>= 0 and j <= (k-4)/2 then
%p A188160                                 return k^2-k-k*j ;
%p A188160                         end if;
%p A188160                 end if;
%p A188160                 if k >= 2 then
%p A188160                         j := n-(k^2+2*k-(k mod 2))/2 ;
%p A188160                         if j>=0 and j <= 1 then
%p A188160                                 return (k^2+2*k-(k mod 2))/2+j
%p A188160                         end if;
%p A188160                 end if;
%p A188160         end do:
%p A188160         return -1 ;
%p A188160 end proc: # _R. J. Mathar_, Apr 22 2011
%Y A188160 Cf. A185700, A177922, A184996, A037306.
%K A188160 nonn
%O A188160 1,3
%A A188160 _Paul Weisenhorn_, Mar 28 2011