R J Cano on Fri, 21 Apr 2017 12:28:21 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

The line x=x0+y!*z


   Greetings!,

   Briefly, please see it in the attachment.

  Cheers,

  Remy
A217626 (Conjecture 4):

      If 2<=m<n, each repetition for the first m!-1 terms inside
	  the first n!-1 terms starts at an index/position which is
	  of the form: 1+(m!*k), where k>=0;

Consequence: If A217626(x0)=1 for some x; Then they exist: y>1,
	and some nonzero integer z such that: The first y!-1 terms
	either start or end at some point in the line x=x0+y!*z;

Greetings!,

Please download and load into GP:

https://oeis.org/wiki/File:RJCano_A217626_and_Patterns_Detection_gp.txt

(Alternatively compile and run it with GP2C)

Then execute the following...

=================
Recipe/Algorithm:
=================

BEGIN
(0a) Set U=10; for now, because resources limitation.
(0b) Set width=23; Either that or any other value of your choice but with the form m!-1; 
(1)  Set p=A217626_firstTerms(U);
(2)  Set j smaller than U, for example let us try every j in 2..U;
(3)  For each j mentioned in (2), set q=A217626_firstTerms(j);
(4a) Set r0=DetectIsBinA(q,p,,1);
(4b) Save first element of r0 somewhere. You might need it later.
(5)  Set r1=firstDiffs(Vec(r0));
(6)  Set r2=r1[1..min(width,#r1)]/(j!);
(7)  Print r2 and enjoy. 
END

Results for r2: Just an arbitrary sample...

j=2; [2, 1,  5, 1, 2, 1, 2, 1,  6, 3, 3,   5, 3, 3,  6, 1, 2, 1, 2, 1,  5, 1, 2]
j=3; [3, 1, 11, 1, 3, 1, 3, 1, 12, 4, 4,  31, 4, 4, 12, 1, 3, 1, 3, 1, 11, 1, 3]
j=4; [4, 1, 19, 1, 4, 1, 4, 1, 20, 5, 5,  79, 5, 5, 20, 1, 4, 1, 4, 1, 19, 1, 4]
j=5; [5, 1, 29, 1, 5, 1, 5, 1, 30, 6, 6, 155, 6, 6, 30, 1, 5, 1, 5, 1, 29, 1, 5]
j=6; [6, 1, 41, 1, 6, 1, 6, 1, 42, 7, 7, 265, 7, 7, 42, 1, 6, 1, 6, 1, 41, 1, 6]
j=7; [7, 1, 55, 1, 7, 1, 7, 1, 56, 8, 8, 415, 8, 8, 56, 1, 7, 1, 7, 1, 55, 1, 7]
j=8; [8, 1, 71, 1, 8]
j=9; [9]

....-_-...

Wish were having already computed and stored at my hard disk 12!-1 terms to delve further into this pattern!.
Perhaps a hard-disk-only implementation could overcome the limits (although in a probably quite slower way);
The one I had approx. 1.5 years ago, was fully lost with such hard disk after it became unreadable (damaged).

=====================================================
  How-to?: Understand the 4th conjecture at A217626
=====================================================

Given a finite subsequence S0 of the first terms in A217626,
the 4th conjecture actually helps to predict (through first
differences like those defining A217626 itself) where it must
be expected to find a repetition for S1 an smaller subsequence
(of the first elements), particularly if S0 has n elements,
s1 has m elements, and they satisfy 2<=m<n;

Let us consider the 3rd row above for the results.

if j=3 and according the initial algorithm specification, we get
that the first element in r0 is 1 (fortunately 1 for any j above
because the "first terms" part of the initial statement);

Remember that (according the algorithm) we divided everything by factorial(j);

S1 for our example comes given by A217626_firstTerms(3), it is: [1,9,2,9,1]

S0 is too large for showing it all here, but let us pick every element in S0
within an "short" range, let us say  1..30, this gives:

[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]

Notice S1 is found 3 times there at such truncation for S0 shown previously.

Therefore in order to locate each one of these 3 occurrences, we need 2 terms
from the first differences at row 3 above, and the first element in r0.

Effectively: S0 starts with [1,9,2,9,1,...

Now the first difference in row 3 is: 3; We multiply it by factorial(j)=6, getting 18;

1 + 18 = 19, so we must go and look at place 19 inside the truncation made to S0:

[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]
............................................................(*) Here!,

Skeptical readers could perform a quick experiment here: Notice each element has coupled a comma,
so select each term with its comma from the one above the asterisk until the left edge of this page.
use an editor to replace the comma with itself. There must be reported 19 replacements made.

The next difference in row 3 is 1; we update our starting position now to: 19 + 1*6 = 25;

[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]
................................................................................(*) Now here.

And we are done!, that's all. Such is the significance of the conjecture 4:

      If 2<=m<n, each repetition for the first m!-1 terms inside
	  the first n!-1 terms starts at an index/position which is
	  of the form: 1+(m!*k), where k>=0;

Almost all: This of course leaves opened a bunch of additional questions about the structural patterns
............that might be hidden by A217626.

Going beyond:  A217626 is a property of every arithmetic progression subject to permutations in lexicographic order.
.............. However, there are other known algorithms besides the Narayana P.'s algorithm, for example the Schmuel
.............. Zaks's prefix-reversals algorithm (mentioned or involved in A055881), also the Steinhaus-Jhonson-Trotter.
.............. and also if A217626 can be worked in a base independent way as shown (at least, or? at last time) since 2014, 
.............. it is plausible (nothing seems to forbid it in principle) the generalization of the underlying combination of
.............. operations to elements in abstract algebras (fields, rings, ...).