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.

Showing 1-5 of 5 results.

A322069 Number of permutations f of {1,...,n} with f(1) < f(n) such that Sum_{k=1..n-1} 1/(f(k)*f(k+1)) = 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 1, 7, 13, 83, 84, 540, 480, 5488, 48922
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 25 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 5. In other words, for each n = 6,7,... we have Sum_{k=1..n-1} 1/(f(k)*f(k+1)) = 1 for some permutation f in the symmetric group S_n.
Conjecture 2: For any integer n > 6, there is an undirected circular permutation g different from the circular permutation (1,2,...,n) such that 1/(g(1)*g(2)) + 1/(g(2)*g(3)) + ... + 1/(g(n-1)*g(n)) + 1/(g(n)*g(1)) = 1.
We have verified both conjectures for n up to 11. For Conjecture 2 with n = 7, we may take (g(1),...,g(7)) = (3,2,1,6,5,4,7) since 1/(3*2) + 1/(2*1) + 1/(1*6) + 1/(6*5) + 1/(5*4) + 1/(4*7) + 1/(7*3) = 1.
See also A322070 for a similar conjecture.

Examples

			a(7) = 1, and for the permutation (2,1,3,7,4,5,6) of {1,...,7} we have 1/(2*1) + 1/(1*3) + 1/(3*7) + 1/(7*4) + 1/(4*5) + 1/(5*6) = 1.
		

Crossrefs

Cf. A322070.

Programs

  • Mathematica
    V[n_]:=V[n]=Permutations[Table[i,{i,1,n}]];
    Do[r=0;Do[If[Part[V[n],k][[1]]>=Part[V[n],k][[n]]||Sum[1/(Part[V[n],k][[i]]*Part[V[n],k][[i+1]]),{i,1,n-1}]!=1,Goto[aa]];r=r+1;Label[aa],{k,1,n!}];Print[n," ",r],{n,1,11}]

Extensions

a(12)-a(15) from Hugo Pfoertner, Aug 20 2022

A322099 Number of permutations f of {1,...,n} with f(1) < f(n) and Sum_{k=1..n-1} 1/(f(k)^2 - f(k+1)^2) = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 4, 4, 55, 78, 552, 3484, 12720
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 26 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 7. In other words, for each n = 8,9,... we have Sum_{k=1..n-1} 1/(f(k)^2 - f(k+1)^2) = 0 for some permutation f in the symmetric group S_n.

Examples

			a(8) = 1, and for the permutation (4,5,2,7,3,1,6,8) of {1,...,8} we have 1/(4^2-5^2) + 1/(5^2-2^2) + 1/(2^2-7^2) + 1/(7^2-3^2) + 1/(3^2-1^2) + 1/(1^2-6^2) + 1/(6^2-8^2) = 0.
a(12) > 0 since for the permutation (1,3,7,5,4,8,6,2,10,11,9,12) of {1,...,12} we have 1/(1^2-3^2) + 1/(3^2-7^2) + 1/(7^2-5^2) + 1/(5^2-4^2) + 1/(4^2-8^2) + 1/(8^2-6^2) + 1/(6^2-2^2) + 1/(2^2-10^2) + 1/(10^2-11^2) + 1/(11^2-9^2) + 1/(9^2-12^2) = 0.
a(13) > 0 since for the permutation (1,6,2,9,11,5,3,7,13,8,4,10,12) of {1,...,13} we have 1/(1^2-6^2) + 1/(6^2-2^2) + 1/(2^2-9^2) + 1/(9^2-11^2) + 1/(11^2-5^2) + 1/(5^2-3^2) + 1/(3^2-7^2) + 1/(7^2-13^2) + 1/(13^2-8^2) + 1/(8^2-4^2) + 1/(4^2-10^2) + 1/(10^2-12^2) = 0.
		

Crossrefs

Programs

  • Mathematica
    V[n_]:=V[n]=Permutations[Table[i,{i,1,n}]];
    Do[r=0;Do[If[Part[V[n],k][[1]]>=Part[V[n],k][[n]]||Sum[1/(Part[V[n],k][[i]]^2-Part[V[n],k][[i+1]]^2),{i,1,n-1}]!=0,Goto[aa]];r=r+1;Label[aa],{k,1,n!}];Print[n," ",r],{n,1,11}]
  • PARI
    a(n)={my(s=0); forperm(n, f, if(f[1]Andrew Howroyd, Nov 27 2018

Extensions

a(12) from Andrew Howroyd, Nov 27 2018
a(13)-a(15) from Hugo Pfoertner, Aug 22 2022

A346387 Number of permutations f of {1,...,prime(n)-1} with f(prime(n)-1) = prime(n)-1 and f(prime(n)-2) = prime(n)-2 such that 1/(f(1)*f(2)) + 1/(f(2)*f(3)) + ... + 1/(f(prime(n)-2)*f(prime(n)-1)) + 1/(f(prime(n)-1)*f(1)) == 0 (mod prime(n)^2).

Original entry on oeis.org

0, 1, 1, 323, 21615, 301654585
Offset: 2

Views

Author

Zhi-Wei Sun, Jul 15 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. In other words, for any prime p > 3, there is a permutation f of {1,...,p-1} with f(p-1) = p-1 and f(p-2) = p-2 such that 1/(f(1)*f(2)) + 1/(f(2)*f(3)) + ... + 1/(f(p-2)*f(p-1)) + 1/(f(p-1)*f(1)) == 0 (mod p^2).
As Wolstenholme proved, for any prime p > 3 we have 1/1^2 + 1/2^2 + ... + 1/(p-1)^2 == 0 (mod p).
For any integer n > 2, clearly 1/(1*2) + 1/(2*3) + ... + 1/((n-1)*n) + 1/(n*1) = 1.

Examples

			a(3) = 1, and 1/(2*1) + 1/(1*3) + 1/(3*4) + 1/(4*2) = 5^2/24 == 0 (mod 5^2).
a(4) = 1, and 1/(2*3) + 1/(3*4) + 1/(4*1) + 1/(1*5) + 1/(5*6) + 1/(6*2) = 7^2/60 == 0 (mod 7^2).
a(5) > 0, and 1/(1*2) + 1/(2*4) + 1/(4*6) + 1/(6*3) + 1/(3*5) + 1/(5*7) + 1/(7*8) + 1/(8*9) + 1/(9*10) + 1/(10*1) = 11^2/126 == 0 (mod 11^2).
a(6) > 0, and 1/(1*2) + 1/(2*3) + 1/(3*7) + 1/(7*4) + 1/(4*9) + 1/(9*5) + 1/(5*8) + 1/(8*10) + 1/(10*6) + 1/(6*11) + 1/(11*12) + 1/(12*1) = 13^2/176 ==0 (mod 13^2).
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute a(5): *)
    VV[i_]:=Part[Permutations[{1,2,3,4,5,6,7,8}],i];
    rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2];
    n=0;Do[If[rMod[Sum[1/(VV[i][[k]]VV[i][[k+1]]),{k,1,7}]+1/(VV[i][[8]]*9)+1/(9*10)+1/(10*VV[i][[1]]),11^2]==0,n=n+1],{i,1,8!}];Print[n]
    a[n_] := Block[{p = Prime@n, inv}, inv = ModularInverse[#, p^2] & /@ Range[p-1]; Length@ Select[ Join[#, Take[inv, -2]] & /@ Permutations[ Take[inv, p-3]], Mod[#[[1]] #[[-1]] + Total[Times @@@ Partition[#, 2, 1]], p^2] == 0 &]]; a /@ Range[2, 6] (* Giovanni Resta, Jul 15 2021 *)

Extensions

a(6)-a(7) from Giovanni Resta, Jul 15 2021

A346391 Number of permutations f of {1,...,n} with f(n) = n and f(n-1) > f(1) such that f(1)*f(2) + ... + f(n-1)*f(n) + f(n)*f(1) == 0 (mod n^2).

Original entry on oeis.org

0, 0, 0, 2, 17, 16, 209, 3192
Offset: 3

Views

Author

Zhi-Wei Sun, Jul 15 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.

Examples

			a(6) = 2, and 2*4 + 4*1 + 1*3 + 3*5 + 5*6 + 6*2 = 3*5 + 5*1 + 1*2 + 2*4 + 4*6 + 6*3 = 2*6^2.
a(7) > 0 with 1*3 + 3*4 + 4*5 + 5*6 + 6*2 + 2*7 + 7*1 = 2*7^2.
a(8) > 0 with 1*5 + 5*3 + 3*6 + 6*4 + 4*7 + 7*2 + 2*8 + 8*1 = 2*8^2.
a(9) > 0 with 1*2 + 2*3 + 3*5 + 5*4 + 4*6 + 6*8 + 8*7 + 7*9 + 9*1 = 3*9^2.
a(10) > 0 with 1*2 + 2*3 + 3*6 + 6*8 + 8*4 + 4*9 + 9*7 + 7*5 + 5*10 + 10*1 = 3*10^2.
a(11) > 0 with 1*3 + 3*4 + 4*5 + 5*8 + 8*6 + 6*9 + 9*7 + 7*10 + 10*2 + 2*11 + 11*1 = 3*11^2.
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute a(7): *)
    VV[i_]:=VV[i]=Part[Permutations[{1,2,3,4,5,6}],i];
    n=0;Do[If[VV[i][[1]]
    				

A356446 Number of permutations f of {1,...,n} with f(1) = 2 and f(2) = 1 such that the numbers f(k)*f(k+1) (0 < k < n) are distinct and Sum_{k=1..n-1} 1/(f(k)*f(k+1)) = 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 11, 7, 61, 388, 2933, 2741
Offset: 2

Views

Author

Zhi-Wei Sun, Aug 07 2022

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
This is stronger than Conjecture 1 in A322069.

Examples

			a(6) = 1 with the permutation (f(1),...,f(6)) = (2,1,3,4,5,6) meeting the requirement. Note that 2*1 = 2, 1*3 = 3, 3*4 = 12, 4*5 = 6 and 5*6 = 30 are pairwise distinct and 1/2 + 1/3 + 1/12 + 1/20 + 1/30 = 1.
a(9) = 1 with the permutation (f(1),...,f(9)) = (2,1,3,8,7,6,5,9,4) meeting the requirement. Note that 2*1 = 2, 1*3 = 3, 3*8 = 24, 8*7 = 56, 7*6 = 42, 6*5 = 30, 5*9 = 45 and 9*4 = 36 are pairwise distinct and 1/2 + 1/3 + 1/24 + 1/56 + 1/42 + 1/30 + 1/45 + 1/36 = 1.
a(11) = 1 with the permutation (f(1),...,f(11)) = (2,1,4,3,5,11,6,7,8,9,10) meeting the requirement. Note that 2*1 = 2, 1*4 = 4, 4*3 = 12, 3*5 = 15, 5*11 = 55, 11*6 = 66, 6*7 = 42, 7*8 = 56, 8*9 = 72 and 9*10 = 90 are pairwise distinct and 1/2 + 1/4 + 1/12 + 1/15 + 1/55 + 1/66 + 1/42 + 1/56 + 1/72 + 1/90 = 1.
a(12) > 0 since for the permutation (f(1),...,f(12)) = (2,1,4,5,3,6,8,10,11,12,7,9) the 11 numbers 2*1 = 2, 1*4 = 4, 4*5 = 20, 5*3 = 15, 3*6 = 18, 6*8 = 48, 8*10 = 80, 10*11 = 110, 11*12 = 132, 12*7 = 84 and 7*9 = 63 are pairwise distinct and 1/2 + 1/4 + 1/20 + 1/15 + 1/18 + 1/48 + 1/80 + 1/110 + 1/132 + 1/84 + 1/63 = 1. Note that f(3) = 4, f(4) = 3 and f(5) is among 5, 6, 8 for all the other permutations f of {1,...,12} meeting the requirement.
		

Crossrefs

Programs

  • Mathematica
    (* A program to find all the permutations f of {1, ..., 10} with f(1) = 2 and f(2) = 1 such that those f(k)*f(k+1) (k = 1..9) are pairwise distinct and Sum_{k=1..9} 1/(f(k)*f(k+1)) = 1. *)
    V[i_]:=V[i]=Part[Permutations[{3, 4, 5, 6, 7, 8, 9, 10}], i]
    m=0; Do[U={2}; Do[U=Append[U, V[i][[j]]*If[j==1, 1, V[i][[j-1]]]], {j, 1, 8}];
    If[Length[Union[U]]==9&&Sum[1/U[[j]], {j, 1, 9}]==1, m=m+1; Print[m, " ", V[i], " ", U]]; Label[aa], {i, 1, 8!}]

Extensions

a(13)-a(15) from Jinyuan Wang, Aug 09 2022
a(16)-a(17) from Hugo Pfoertner, Aug 19 2022
Showing 1-5 of 5 results.