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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

3, 4, 6, 4, 11, 4
Offset: 1

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Smallest factorial indices k such that (k!/n-1, k!/n+1) = (A001359(j), A006512(j)) for some twin prime index j.
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

Examples

			For n=6, solutions to k!/n - 1 = A001359(j) are given by k = 4, 11, 13, 17, ...
The smallest k out of these, k=4, is a(6).
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ ! (PrimeQ[(k! - n)/n] && PrimeQ[(k! + n)/n]), k++ ]; AppendTo[a, k]; Print[a], {n, 1, 6}]; a
  • 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

Formula

A000142(a(n))/n - 1 = A139187(n).
A000142(a(n))/n + 1 = A139188(n).

A139187 Smallest twin prime member A001359 of the form k!/n-1.

Original entry on oeis.org

5, 11, 239, 5, 7983359, 3
Offset: 1

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

"Factorial" twin primes are a pair (k!/n-1, k!/n+1) = (A001359(j), A006512(j)).
Given n, the sequence shows the smallest a(n)=A001359(j) solving this pair equation.
The associated upper twin prime is A139188(n) = A006512(j) = A001359(j)+2 = a(n)+2, and the associated factorial index is k(n) = A139186(n).
The twin prime indices j(n) are 2, 3, 17, 2, 48525, 1.
a(7) is unknown, with k(7) > 25000. A continuation of the sequence, with unknown terms indicated by 0, is a(7)..a(50): 0, 453599, 0, 11, 0, 59, 0, 0, 2687, 0, 0, 0, 2688996956405759999, 5, 239, 0, 0, 29, 44960029111104307199, 0, 134399, 179, 0, 3, 0, 0, 0, 0, 1151, 100799, 0, 0, 536481791999, 17, 0, 0, 0, 141523199, 0, 1313375283986387731246850697141608641462271999999999, 0, 7559, 0, 8065829222532112711679999. - Hugo Pfoertner, Mar 30 2020

Examples

			For n=1, the smallest k is 3, where (3!/1-1,3!/1+1) = (5,7) = (A001359(2),A006512(2)).
For n=3, the smallest k is 6, where (6!/3-1,6!/3+1) = (239,241) = (A001359(17),A006512(17)).
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ ! (PrimeQ[(k! - n)/n] && PrimeQ[(k! + n)/n]), k++ ]; AppendTo[a, (k! - n)/n], {n, 1, 6}]; a
Showing 1-2 of 2 results.