



0, 1, 3, 5, 8, 11, 14, 17, 20, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 119, 124, 129, 134, 139, 144, 149, 154, 159, 164, 169, 174, 179, 184, 189, 194, 199, 204, 209, 214, 219, 224, 229, 234, 239, 244, 249
(list;
graph;
refs;
listen;
history;
text;
internal format)



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 nth 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

A. Karttunen, Table of n, a(n) for n = 0..5614
Index entries for sequences related to permutations


FORMULA

a(0)=0; for n >= 1, a(n) = a(n1) + 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 intseqlibrary): (definec (A084555 n) (if (zero? n) 0 (+ (A084556 n) (A084555 (1+ n)))))


CROSSREFS

Differs from A084505 first time at the 130th term, where A084505(130) = 605, while A084555(130) = 604.
Sequence in context: A129260 A076829 A084505 * A102696 A130262 A094228
Adjacent sequences: A084552 A084553 A084554 * A084556 A084557 A084558


KEYWORD

nonn


AUTHOR

Antti Karttunen, Jun 02 2003


EXTENSIONS

Moved the misplaced Mathematica code from A084505.  Antti Karttunen, Oct 24 2012


STATUS

approved



