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
0, 1, 1, 1, 1, 3, 10, 55, 199, 1915, 13679, 86296 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,6
COMMENTS
a(n) > 0 for all n > 2.
LINKS
Zhi-Wei Sun, On permutations of {1,...,n} and related topics, J. Algebraic Combin., 2021.
EXAMPLE
a(3) = 1 with p = 2^(1-1) + 1^(3-1) + 3^(2-1) = 5, p - 2 = 3 and p + 6 = 11 all prime.
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.
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.
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.
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.
MATHEMATICA
(* A program to compute a(7): *)
PQ[n_]:=PQ[n]=PrimeQ[n]&&PrimeQ[n-2]&&PrimeQ[n+6];
V[i_]:=V[i]=Part[Permutations[{1, 2, 3, 4, 5, 6}], i];
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);
n=0; Do[If[PQ[S[i]], n=n+1], {i, 1, 6!}]; Print[7, " ", n]
CROSSREFS
Sequence in context: A318188 A229311 A208480 * A359976 A034234 A284645
KEYWORD
nonn,more
AUTHOR
Zhi-Wei Sun, Apr 01 2021
EXTENSIONS
a(11)-a(13) from Jinyuan Wang, Apr 02 2021
STATUS
approved

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 May 1 22:42 EDT 2024. Contains 372178 sequences. (Running on oeis4.)