A220664 First differences of A030299.
11, 9, 102, 9, 81, 18, 81, 9, 913, 9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 8024, 9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 5913, 9, 81, 18, 81, 9, 1602, 9, 261
Offset: 1
Examples
A030299 starts (1, 12, 21, 123, 132, 213, 231, 312, ...), the first differences thereof yield (11, 9, 102, 9, 81, 18, 81, ...).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..5912
Programs
-
Maple
(l-> seq(l[j]-l[j-1], j=2..nops(l)))([seq(map(x-> parse(cat(x[])), combinat[permute](n))[], n=0..5)])[]; # Alois P. Heinz, Nov 09 2021
-
PARI
{A030299=concat( vector( 5,k, vecsort( vector( (#k=vector(k, j, 10^j)~\10)!, i, numtoperm(#k, i-1)*k )))); A220664=vecextract(A030299,"^1")-vecextract(A030299,"^-1")} \\ M. F. Hasler, Jan 12 2013
-
Python
from itertools import permutations def pmap(s, m): return sum(s[i-1]*10**(m-i) for i in range(1, len(s)+1)) def agen(): m = 1 while True: for s in permutations(range(1, m+1)): yield pmap(s, m) m += 1 def aupton(terms): alst, g = [], agen() t = next(g) while len(alst) < terms: t, prevt = next(g), t alst += [t - prevt] return alst print(aupton(65)) # Michael S. Branicky, Nov 09 2021
-
Scheme
(define (A220664 n) (- (A030299 (+ 1 n)) (A030299 n)))
Comments