OFFSET
1,1
COMMENTS
This sequence is the natural extension of A107346 (and others, see below) from 5!-1 to 9!-1 terms, which is the natural (since maximal) length, given that OEIS sequence data are stored as decimal numbers. On the other hand, it is quite different from A219664 in many aspects, not only for the reason that the other sequence is infinite and therefore differs from this one in all terms beyond n = 9!-1.
The sequence is finite, with 9!-1 terms, and symmetric: a(n)=a(9!-n).
All terms are multiples of 9, cf. formula.
The subsequence of the first n!-1 terms (n=2,...,9) yields the first differences of the sequence of numbers whose digits are a permutation of (1,...,n):
The first 8!-1 terms yield the first differences of A178478: numbers whose digits are a permutation of 12345678.
The first 7!-1 terms yield the first differences of A178477: numbers whose digits are a permutation of 1234567.
The first 6!-1 terms yield the first differences of A178476: numbers whose digits are a permutation of 123456.
FORMULA
a(n) = a(m!-n) for any m < 10 such that n < m!.
EXAMPLE
The same initial terms are obtained for the permutations of any set of the form {1,...,m}, e.g., {1,2,3} or {1,...,9}: In the first case we have P = (123,132,213,231,312,321) and P(4)-P(3) = 231 - 213 = 18 = a(3), and in the latter case P(4)-P(3) = 123456897 - 123456879 = 18, again. - M. F. Hasler, Jan 12 2013
MATHEMATICA
Take[Differences[Sort[FromDigits/@Permutations[Range[9]]]], 70] (* Harvey P. Dale, Mar 31 2018 *)
PROG
CROSSREFS
KEYWORD
easy,nonn,base,fini
AUTHOR
M. F. Hasler, Jan 12 2013
STATUS
approved