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.

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.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 10, 55, 199, 1915, 13679, 86296
Offset: 2

Views

Author

Zhi-Wei Sun, Apr 01 2021

Keywords

Comments

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

Examples

			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.
		

Crossrefs

Programs

  • 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]

Extensions

a(11)-a(13) from Jinyuan Wang, Apr 02 2021