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.

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

This page as a plain text file.
%I A346387 #18 Jul 16 2021 10:08:49
%S A346387 0,1,1,323,21615,301654585
%N 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).
%C A346387 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).
%C A346387 As Wolstenholme proved, for any prime p > 3 we have 1/1^2 + 1/2^2 + ... + 1/(p-1)^2 == 0 (mod p).
%C A346387 For any integer n > 2, clearly 1/(1*2) + 1/(2*3) + ... + 1/((n-1)*n) + 1/(n*1) = 1.
%e A346387 a(3) = 1, and 1/(2*1) + 1/(1*3) + 1/(3*4) + 1/(4*2) = 5^2/24 == 0 (mod 5^2).
%e A346387 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).
%e A346387 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).
%e A346387 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).
%t A346387 (* A program to compute a(5): *)
%t A346387 VV[i_]:=Part[Permutations[{1,2,3,4,5,6,7,8}],i];
%t A346387 rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2];
%t A346387 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]
%t A346387 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 *)
%Y A346387 Cf. A000040, A322070, A322099, A342965, A346391.
%K A346387 nonn,more
%O A346387 2,4
%A A346387 _Zhi-Wei Sun_, Jul 15 2021
%E A346387 a(6)-a(7) from _Giovanni Resta_, Jul 15 2021