login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342966 Number of permutations tau of {1,...,n} with tau(n) = n such that p = tau(1)^(tau(2)-1) + ... + tau(n-1)^(tau(n)-1) + tau(n)^(tau(1)-1), and p - 2 and p + 6 are all prime. 2

%I #20 Apr 03 2021 03:03:59

%S 0,1,1,1,1,3,10,55,199,1915,13679,86296

%N Number of permutations tau of {1,...,n} with tau(n) = n such that p = tau(1)^(tau(2)-1) + ... + tau(n-1)^(tau(n)-1) + tau(n)^(tau(1)-1), and p - 2 and p + 6 are all prime.

%C a(n) > 0 for all n > 2.

%H Zhi-Wei Sun, <a href="https://doi.org/10.1007/s10801-021-01028-8">On permutations of {1,...,n} and related topics</a>, J. Algebraic Combin., 2021.

%e a(3) = 1 with p = 2^(1-1) + 1^(3-1) + 3^(2-1) = 5, p - 2 = 3 and p + 6 = 11 all prime.

%e a(4) = 1 with p = 1^(3-1) + 3^(2-1) + 2^(4-1) + 4^{1-1) = 13, p - 2 = 11 and p + 6 = 19 all prime.

%e a(5) = 1 with p = 2^(4-1) + 4^(3-1) + 3^(1-1) + 1^(5-1) + 5^(2-1) = 31, p - 2 = 29 and p + 6 = 37 all prime.

%e a(6) = 1 with p = 4^(3-1) + 3^(1-1) + 1^(5-1) + 5^(2-1) + 2^(6-1) + 6^(4-1) = 271, p - 2 = 269 and p + 6 = 277 all prime.

%e a(10) > 0 since p = 4^(8-1) + 8^(5-1) + 5^(6-1) + 6^(3-1) + 3^(9-1) + 9^(1-1) + 1^(7-1) + 7^(2-1) + 2^(10-1) + 10^(4-1) = 31723, p - 2 = 31721 and p + 6 = 31729 are all prime.

%t (* A program to compute a(7): *)

%t PQ[n_]:=PQ[n]=PrimeQ[n]&&PrimeQ[n-2]&&PrimeQ[n+6];

%t V[i_]:=V[i]=Part[Permutations[{1,2,3,4,5,6}],i];

%t S[i_]:=S[i]=Sum[V[i][[j]]^(V[i][[j+1]]-1), {j,1,5}]+V[i][[6]]^6+7^(V[i][[1]]-1);

%t n=0;Do[If[PQ[S[i]],n=n+1],{i,1,6!}];Print[7," ",n]

%Y Cf. A000040, A046134, A342965.

%K nonn,more

%O 2,6

%A _Zhi-Wei Sun_, Apr 01 2021

%E a(11)-a(13) from _Jinyuan Wang_, Apr 02 2021

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)