cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

R. J. Cano, Oct 04 2012

Keywords

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,...,m-1} are N(s) = Sum_{i=1..m} s(i)*10^(m-i). 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, b-1, 2, b-1, 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,b-1,2,b-1,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 1A217626 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 <= m-1) be the 1st differences of P. These differences are symmetric if y[j]=y[m-j] which for P implies the condition x[j]+x[m-j+1]=x[j+1]+x[m-j];
Consequence: When m=n! and P is a set with all the permutations for the letters 0..n-1, 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 (n-1)*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..n-1, 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..n-1, 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<=mR. 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 y-th matrix defining the irregular table in A237265 and the consecutive permutation preceding it in lexicographic order (See EXAMPLE). - R. J. Cano, May 09 2017

Examples

			a(1)= A215940(2) - A215940(1) = 1 - 0 = 1.
a(2)= A215940(3) - A215940(2) = 10-01 = 9.
a(3)= A215940(4) - A215940(3) = 12-10 = 2.
a(4)= A215940(5) - A215940(4) = 21-12 = 9.
a(5)= A215940(6) - A215940(5) = 22-21 = 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: (3124-2431)/9 = 693/9 = (2013-1320)/9 = 77 = a(12). (End)
		

Crossrefs

Cf. A219995 [ On the summation of 1/a(n) ].

Programs

  • C
    // See LINKS.
    
  • 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 (* Jean-François Alcover, Apr 25 2013 *)
  • PARI
    first_terms(n)={n=max(3,n);my(m:small=n!);my(a:vec=vector(m-1),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=(y-x)[1..n-1];if(u,z=vector(#z,j,vecsum(z[1..j])));a[i]=fromdigits(z,B-u);a[#a-i+1]=a[i];x=y;);z=(numtoperm(n,m+1)-y)[1..n-1];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
  • Scheme
    (define (A217626 n) (/ (A219664 n) 9)) ;; - Antti Karttunen, Dec 18 2012
    

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

Extensions

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