OFFSET
1,1
COMMENTS
First 5!-1 terms are identical to A107346, and the 9!-1 terms are identical to A209280. (Updated by M. F. Hasler, Jan 12 2013, Mar 03 2013)
Because of the self-similar nature of A220664, this sequence can be also constructed by picking appropriate terms from there with the auxiliary sequence A220655, cf. formula.
Similarly, differences between successive permutations of {1,2,...,k} in lexicographic order interpreted as decimal numbers, for any k=2..9, produce the first (k!)-1 terms of this sequence. But for k=10 the result is ill-defined, so we can consider the sequence finite, well-defined only for n=1..362879. [See however the following comment. - Editor's note]
In sequence A030299 it is clearly defined how it extends beyond index n = 1!+2!+...+9! = A007489(9), so the sequence A220664 of its first differences is well-defined up to infinity. (The "result" mentioned above is ill defined because the meaning of "interpreted" is not clear.) But the preceding comment is misleading by speaking of "self similar nature", and the sequence definition as "repeating part" is also misleading: If the sequence is defined to be of finite length 9!-1 (thus equal to A209280), then it is indeed infinitely often repeated as a subsequence (of consecutive terms) in A220664 (even when the latter was defined using concatenation for permutations of more than 9 elements, but then not as differences of the terms following 12345678910 where it was expected, but, e.g., as differences of the terms following 10123456789, etc.).
Since A030299 has been defined through a ("simpler") sum rather than concatenation, the nice mathematical properties of A220664, and even more this sequence A219664, persist beyond n=9!. - M. F. Hasler, Jan 12 2013
LINKS
A. Karttunen, Table of n, a(n) for n = 1..5039
EXAMPLE
The first four permutations of nine elements at A030299(A003422(9)..A003422(9)+3) (the terms A030299(46234..46237)) are: 123456789, 123456798, 123456879, 123456897. As 123456897-123456879 = 18, thus we have a(3) = 18.
We could compute the same value from any smaller set of permutations of at least three elements, for example, from the five element permutations used in A107346. In that case, the permutations A030299(A003422(5)..A003422(5)+3) (the terms A030299(34..37)) are: 12345, 12354, 12435, 12453, ... and we get the same result, a(3) = 12453-12435 = 18.
PROG
(PARI) A219664(n)=for(k=2, n+1, k!>n || next; k=vecsort( vector( (#k=vector(k, j, 10^j)~\10)!, i, numtoperm(#k, i)*k )); return(k[n+1]-k[n])) \\ (It is of course more efficient to calculate a whole vector of the first k!-1 terms. Also, for n>9!, this might yield incorrect terms.) - M. F. Hasler, Jan 12 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 18 2012
STATUS
approved