[go: up one dir, main page]

login
a(n) is the smallest k such that k!/n +- 1 is a twin prime pair.
3

%I #25 Mar 31 2020 10:18:27

%S 3,4,6,4,11,4

%N a(n) is the smallest k such that k!/n +- 1 is a twin prime pair.

%C Smallest factorial indices k such that (k!/n-1, k!/n+1) = (A001359(j), A006512(j)) for some twin prime index j.

%C If it exists, a(7) > 1000. A continuation of the sequence, with unknown terms indicated by 0, is a(8)..a(50): 10, 0, 5, 0, 6, 0, 0, 8, 0, 0, 0, 21, 5, 7, 0, 0, 6, 22, 0, 10, 7, 0, 5, 0, 0, 0, 0, 8, 10, 0, 0, 16, 6, 0, 0, 0, 13, 0, 43, 0, 9, 0, 26. The unknown terms have been checked through k <= 1000. - _Hugo Pfoertner_, Mar 29 2020

%F A000142(a(n))/n - 1 = A139187(n).

%F A000142(a(n))/n + 1 = A139188(n).

%e For n=6, solutions to k!/n - 1 = A001359(j) are given by k = 4, 11, 13, 17, ...

%e The smallest k out of these, k=4, is a(6).

%t a = {}; Do[k = 1; While[ ! (PrimeQ[(k! - n)/n] && PrimeQ[(k! + n)/n]), k++ ]; AppendTo[a, k]; Print[a], {n, 1, 6}]; a

%o (PARI) a(n) = {my(k=1); while (! ((denominator(m=k!/n)==1) && isprime(m-1) && isprime(m+1)), k++); k;} \\ _Michel Marcus_, Mar 29 2020

%Y Cf. A139187, A139188.

%K nonn,more

%O 1,1

%A _Artur Jasinski_, Apr 11 2008