OFFSET
0,3
COMMENTS
For n>=1, (A130664(n),a(n)) = (1,1),(2,3),(4,5),(6,8),(9,11),(12,14),... gives the starting and ending offsets of the n-th permutation in the sequences like A030298 & A030496.
Note: this sequence is related to (ordinary) permutations. For a similar sequence related to juggling with three objects, see A084505.
LINKS
FORMULA
a(0)=0; for n >= 1, a(n) = a(n-1) + A084556(n). Also a(n) = A130664(n+1) - 1. - Antti Karttunen, Dec 18 2012
MATHEMATICA
Accumulate@ Flatten[ Table[#, {#!}] & /@ Range[0, 5]]
PROG
(Scheme with memoization macro definec from Antti Karttunen's intseq-library): (definec (A084555 n) (if (zero? n) 0 (+ (A084556 n) (A084555 (-1+ n)))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 02 2003
EXTENSIONS
Moved the misplaced Mathematica code from A084505. - Antti Karttunen, Oct 24 2012
STATUS
approved