

A217626


First differences of A215940, or first differences of permutations of (0,1,2,...,m1) reading them as decimal numbers, divided by 9 (with 10>=m, and m! > n).


10



1, 9, 2, 9, 1, 78, 1, 19, 3, 8, 2, 77, 2, 8, 3, 19, 1, 78, 1, 9, 2, 9, 1, 657, 1, 9, 2, 9, 1, 178, 1, 29, 4, 7, 3, 66, 2, 18, 4, 18, 2, 67, 1, 19, 3, 8, 2, 646, 1, 19, 3, 8, 2, 67, 1, 29, 4, 7, 3, 176, 3, 7, 4, 29, 1, 67, 2, 8, 3, 19, 1, 646, 2, 8, 3, 19, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Terms do not depend on the choice of m, provided that m!>n (the index of the considered term), and the numbers associated to a permutation s of {0,...,m1} are N(s)=sum_{i=1..m} s(i)*10^(mi). This defines the present sequence for any arbitrarily large index, not limited to n <= 10!, for example.
Similar sequences might be built in another base b, they would always start (1, b1, 2, b1, 1, ...). The partial sums of this kind of sequence would yield the analog of A215940 in the corresponding base.
There are at least two palindromic patterns which are repeated throughout this sequence: one of them is "1,b1,2,b1,1" (It is optional here whether or not to include the 1's), another is built from the first 4!1 terms (See the corresponding link for details).
Also, for 1<=n<=(9!)1: The repeating parts in the first differences of A030299 divided by nine, i.e. a(n) = A219664(n)/9.  Antti Karttunen, Dec 18 2012. Edited by: R. J. Cano, May 09 2017
There are more palindromic patterns than those mentioned above: Similar to the first 3!1 and the first 4!1 terms, the first k!1 terms are repeated for all other k>4. Frequent are also multiples of these, e.g., k*[1,9,2,9,1] = [2,18,4,18,2], [3,27,6,27,3], ...), [1, 19, 3, 8, 2, 67, 1, 29, 4, 7, 3, 176, 3, 7, 4, 29, 1, 67, 2, 8, 3, 19, 1], and others. The "middle part" of roughly half the length (e.g., [9,2,9] or [67,...,67] in the last example), is repeated even more frequently.  M. F. Hasler, Jan 14 2013
From R. J. Cano, Apr 04 2016: (Start)
Conjecture 1: Given 1<n<=M two positive integers, the first n!1 terms of this sequence are inserted (Mn+1)! times with (anti)symmetric distribution among the first M!1 terms of this sequence. The described count and alternating pattern of symmetry is conserved whenever it is possible (i.e., when having enough terms) through successive differences and for the corresponding sequences (i.e., the first differences of A217626 and so on).
Lemma: Let P be an arbitrary set consisting of m integers; let x[i] be an element in P (with 1<=i<=m); let y[j] = x[j+1]  x[j] (with 1 <= j <= m1) be the 1st differences of P. These differences are symmetric if y[j]=y[mj] which for P implies the condition x[j]+x[mj+1]=x[j+1]+x[mj];
Consequence: When m=n! and P is a set with all the permutations for the letters 0..n1, the preceding lemma implies P has associated at least a set Q such that 1st differences in Q are symmetric.
Generating algorithm: Such Q can be built based upon P and the condition given by the preceding lemma if it is removed from P (until P becomes empty) its 1st element tau, inserting them both in Q tau and its arithmetic complement to repdigit (n1)*111...1 (n times 1) removing the mentioned complement from P.
Conjecture 2: The autosimilarity shown by a(n) is a consequence of the fact that the corresponding P is the set of the n! permutations in increasing sequence for the letters 0..n1, and Q=P (it holds if they are replaced "a(n)" and "increasing" respectively with "1*a(n)" and "decreasing").
Note: "Q=P" is a necessary but not sufficient condition for observing the autosimilarity in a(n).
Application: The "generating algorithm" described previously might be potentially useful for parallel computing. In combination with the partition scheme proposed at links in A237265, and multiple indirection. For example notice that in such sense an algorithm for generating k! permutations with an increasing sequence would require only k!/2 iterations because the other half would be already determined by symmetry.
Conjecture 3: For n>2, given P the set of permutations in increasing sequence for the letters 0..n1, there are distributed with a symmetric pattern among its (n!)! permutations all those A000165(n!\2) of them such that their 1st differences are symmetric. Moreover by setting to zero the other elements whose 1st differences are not symmetric, we obtain an antisymmetric sequence.
(End)
Conjecture 4: If 2<=m<n, and S is defined as the first differences of a sequence giving the starting position of each repetition for the first m!1 terms inside the first n!1 terms, then each element in S is 0 mod m!.  R. J. Cano, Apr 19 2017
Consider the first y!1 terms for even y; The central term a(y!/2) is determined by the difference between the (y/2+1)th row from the yth matrix defining the irregular table in A237265 and the consecutive permutation preceding it in lexicographic order (See EXAMPLE).  R. J. Cano, May 09 2017


LINKS

A. Karttunen, Table of n, a(n) for n = 1..40319
R. J. Cano, Compressed file: a(n) for n = 1..3628799, the first 10!1 terms of this sequence.
R. J. Cano, Additional information about this sequence.
R. J. Cano, Template for a baseindependent sequencer in C.


FORMULA

a(n) = A215940(n+1)  A215940(n).
a(n) = A219664(n)/9, for n=1..362879.  Antti Karttunen, Dec 18 2012
a(n) = A209280(n)/9, for n < 9!.  M. F. Hasler, Jan 12 2013


EXAMPLE

a(1)= A215940(2)  A215940(1) = 1  0 = 1.
a(2)= A215940(3)  A215940(2) = 1001 = 9.
a(3)= A215940(4)  A215940(3) = 1210 = 2.
a(4)= A215940(5)  A215940(4) = 2112 = 9.
a(5)= A215940(6)  A215940(5) = 2221 = 1.
[ From R. J. Cano, May 09 2017: Start ]
On the central terms for subsequences consisting of the first y!1 terms with even y: Let us pick y=4; The first y!1=23 terms are,
(1,9,2,9,1,78,1,19,3,8,2,77,2,8,3,19,1,78,1,9,2,9,1)
the central term there is a(12)=77; If we look into A237265, the 4th matrix defining it contains as its (4/2+1)th or third row, the permutation 3124 which in lexicographic order is preceded by 2431, therefore by subtracting and dividing by 9 we obtain:
(31242431)/9 = 693/9 = (20131320)/9 = 77 = a(12); [End]


MAPLE

A217626:=n>A215940(n+1)A215940(n);


MATHEMATICA

maxm = 5; Table[dd = FromDigits /@ Permutations[Range[m]]; (Drop[dd, If[m == 1, 0, (m  1)!]]  First[dd])/9, {m, 1, maxm}] // Flatten // Differences (* JeanFrançois Alcover, Apr 25 2013 *)


PROG

(C) See LINKS.
(Scheme): (define (A217626 n) (/ (A219664 n) 9)) ;;  Antti Karttunen, Dec 18 2012
(PARI) first_terms(n)={n=max(3, n); my(m:small=n!); my(a:vec=vector(m1), i:small=0, x:vec=numtoperm(n, 0), y:vec, z:vec, u:small, B:small=11); m\=2; m; while(i++<=m, u=!(i%6); y=numtoperm(n, i); z=(yx)[1..n1]; if(u, z=vector(#z, j, vecsum(z[1..j]))); a[i]=fromdigits(z, Bu); a[#ai+1]=a[i]; x=y; ); z=(numtoperm(n, m+1)y)[1..n1]; a[m+1]=fromdigits(vector(#z, j, vecsum(z[1..j])), B); return(a)} \\ Computes the first either 5 or n!1 terms.  R. J. Cano, May 28 2017


CROSSREFS

Cf. A215940, A207324, A219664, A220664, A030299.
Cf. A219995 [ On the summation of 1/a(n) ].
Sequence in context: A157215 A021919 A078127 * A275362 A217174 A230157
Adjacent sequences: A217623 A217624 A217625 * A217627 A217628 A217629


KEYWORD

nonn,base,easy


AUTHOR

R. J. Cano, Oct 04 2012


EXTENSIONS

Definition simplified by M. F. Hasler, Jan 12 2013


STATUS

approved



