Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Demonstrative PARI/GP program about some structural properties of the A217626 sequence.
- Usage instructions:
- 1) Download and decompress (format Gzip), the following file: http://www.oeis.org/w/images/d/d7/B-file_woOffset.txt.gz
- 2) Place together both files (the data file and this program) in the same directory of your choice.
- 3) Before running ensure that the usual favorable conditions are present in your system.
- (file/execution permissions, the GP interpreter works properly, ...)
- 4) Run the program.
- Note(s):
- --------
- Ending conjecture by: R. J. Cano, Dec 12 2012
- */
- v23=[1, 9, 2, 9, 1, 78, 1, 19, 3, 8, 2, 77, 2, 8, 3, 19, 1, 78, 1, 9, 2, 9, 1];
- v03=[9,2,9];
- print(" Number of times that the following palindromics:");
- print(" ");
- print(v23);
- print(" and");
- print(v03);
- print(" ");
- print("Are present repeated inside the first N! terms of the sequence A217626.");
- print(" ");
- print("Setting up the execution environment. ");
- default(parisize,100663296);
- print("Loading b-file (without Offsets) data.");
- x=readvec("B-file_woOffset.txt");
- print("Ready.");
- print(" ");
- print("Running the counter algorithm(s). Please wait...");
- Omega=10; \\ Defined according the data. It means (10!/2) terms of A217626 stored in the data file to be uploaded.
- unit=vector(Omega);
- count929(Q)={unit[Q]=1;z=0+(Q==3);for(s=3,Q!/2,e=1;for(k=0,2,e*=(v03[3-k]==x[s-k]));if(e,z++);if(x[s]==1,unit[Q]++));if(Q>=3,unit[Q]*=2);(if(Q>3,2,1)*z)};
- antifac(n)={ans=0;while((ans+1)!<= n, ans++);ans};
- palindrocount(N)={tester=vector(23); Q=22;L=N!/2;times=0;for(tau=1,L,G=x[tau];for(u=1,Q,tester[u]=tester[u+1]); tester[Q+1]=G; if(tester==v23,times++)); (2*times+(N==4))};
- tab=" ";
- tab2=" ";
- z=vector(Omega,w,count929(w));
- f=vector(10);
- for(w=4,10,f[w]=palindrocount(w));
- print(" ");
- print("About: ",v03);
- print(" ");
- print(" #terms in Counts:");
- print(" data file",tab,tab,"{1}929{1} unit(total) unit(NOT belonging to such palindromic)");
- for(u=2,Omega,print(tab,u,"!-1",tab,tab,antifac(z[u]),"!",tab,antifac(unit[u]),"!",tab,tab,2*(u==2)+(u-3)*(u-2)!,if(u>=7,"= 20*"," "),if(u>=7,((u-3)*(u-2)!)/20," ")));
- print(" ");
- print(" Notice from the table that every multiple of (N-2)! is 0 (mod 20) for N equal or greater than 7.");
- print(" ");
- print(" Upon being true as consequence of the identity: (N-2)!=5!*prod_{k=1..N-7}(5+k) when N>=7...");
- print(" ");
- print(" Such fact doesn't come randomly. It is strongly related to a combinatorial-periodic pattern recently");
- print(" identified while studying A218976, when the 5-adic valuation of \"y\" -any given positive integer-");
- print(" was replaced with the overestimation: f(y)=floor(y/20)+floor(y/5)");
- print(" ");
- print("About: ",v23);
- print(" ");
- print("--[N]----- Count(s) ----------");
- for(w=4,10,print(" ",w,")",tab2,antifac(f[w]),"!"));
- print("------------------------------");
- print(" ");
- print("Conjecture: (N-3)! times for every N greater than 3.");
- print(" ");
- quit;
Add Comment
Please, Sign In to add comment