login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 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,...,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 1<n<=M two positive integers, the first n!-1 terms of this sequence are inserted (M-n+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 <= 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<=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 base-independent 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) = 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]

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 *)

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(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

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 22:34 EDT 2019. Contains 328335 sequences. (Running on oeis4.)