OFFSET
1,2
COMMENTS
n=4 has 2^3=8 compositions: 4; 3+1; 1+3; 1+1+2; 1+2+1: 2+1+1; 2+2; 1+1+1+1; the period is [(2+1+1),(2+2),(3+1)]; to reach the repetition from each composition one needs at most 5 steps; (1+3)->(4)->(1+1+1+1)->(2+1+1)->(2+2)->(3+1)->(2+1+1).
LINKS
R. Baumann, Computer-Knobelei, , LOGIN, 163/164 (2010), 141-142 (in German).
FORMULA
a((k^2+k-2)/2-j) = (3k^2-3k-4)/2-(k+1)*j with 0<=j<=(k-2) div 2, for k>1.
a((k^2+k)/2) = (3k^2-3k)/2, for k>1.
a((k^2+k+2)/2) = (3k^2-3k)/2-k*j with 0<=j<=(k-3) div 2, for k>1.
a(2u^2+2u) = 4u^2+u with 1<=u and k=2u.
EXAMPLE
For k=10 and j=2 the formula gives; a(52)=111; a(55)=135; a(58)=115; a(60)=105;
For n=4: (4)->(1+1+1+1)->(2+1+1)->(2+2)->(3+1) [4 steps]; (3+1)->(2+1+1)->(2+2) [2 steps]; (1+3)->(4)->(1+1+1+1)->(2+1+1)-(2+2)->(3+1) [5 steps]; (1+1+2)->(2+2)->(3+1)->(2+1+1) [3 steps]; (1+2+1)->(3+1)->(2+1+1)->(2+2) [3 steps]; (2+1+1)->(2+2)->(3+1) [2 steps]; (2+2)->(3+1)->(2+1+1) [2 steps]; (1+1+1+1)->(2+1+1)->(2+2)->(3+1) [3 steps]; so at most 5 steps are needed, a(4)=5.
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Weisenhorn, Dec 16 2010
STATUS
approved