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.
%I A342966 #24 Dec 23 2024 09:53:42 %S A342966 0,1,1,1,1,3,10,55,199,1915,13679,86296 %N 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. %C A342966 a(n) > 0 for all n > 2. %H A342966 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 A342966 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 A342966 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 A342966 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 A342966 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 A342966 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 A342966 (* A program to compute a(7): *) %t A342966 PQ[n_]:=PQ[n]=PrimeQ[n]&&PrimeQ[n-2]&&PrimeQ[n+6]; %t A342966 V[i_]:=V[i]=Part[Permutations[{1,2,3,4,5,6}],i]; %t A342966 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 A342966 n=0;Do[If[PQ[S[i]],n=n+1],{i,1,6!}];Print[7," ",n] %Y A342966 Cf. A000040, A046134, A342965. %K A342966 nonn,more %O A342966 2,6 %A A342966 _Zhi-Wei Sun_, Apr 01 2021 %E A342966 a(11)-a(13) from _Jinyuan Wang_, Apr 02 2021