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.

A245695 Least number k >= 0 such that (n!+k)/n is prime.

Original entry on oeis.org

1, 2, 0, 4, 25, 42, 49, 88, 207, 170, 121, 12, 377, 938, 285, 688, 391, 558, 703, 1780, 609, 682, 713, 2328, 3275, 1066, 1593, 28, 1943, 6690, 3317, 4064, 2607, 1258, 3395, 2196, 4847, 38, 1677, 3880, 2173, 42, 4171, 3124, 2115, 10994, 4747, 11184, 2597, 4150, 3111, 14092, 2809, 3834, 12265, 3976, 8493, 6206, 16697, 17580, 16531, 47678, 8253, 17344, 4355, 12738, 18961, 4964, 5727, 9170, 9869, 61704, 7373
Offset: 1

Views

Author

Derek Orr, Jul 29 2014

Keywords

Comments

a(n) = M*n for some integer M >= 0.
a(n) = n times least m >= 0 such that (n-1)!+m is prime. - Jens Kruse Andersen, Jul 30 2014

Examples

			(4!+0)/4 = 6 is not prime.
(4!+1)/4 = 25/4 is not prime.
(4!+2)/4 = 26/4 is not prime.
(4!+3)/4 = 27/4 is not prime.
(4!+4)/4 = 7 is prime. Thus a(4) = 4.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=0,10^6,s=(n!+k)/n;if(floor(s)==s,if(ispseudoprime(s),return(k))))
    n=1;while(n<100,print1(a(n),", ");n++)

Formula

a(n) = n*A033932(n-1), except a(3) = 0 where A033932 demands positive values. - Jens Kruse Andersen, Jul 30 2014

A245697 Least number k such that (n!+k)/n and (n!-k)/n are both prime.

Original entry on oeis.org

0, 4, 25, 42, 133, 152, 279, 170, 121, 204, 1079, 938, 5295, 3632, 2771, 1062, 1159, 2260, 7413, 682, 33281, 13704, 9725, 4966, 9099, 24724, 2929, 54690, 20429, 22688, 5379, 46274, 15365, 11052, 40441, 65854, 97149, 42520, 44731, 83958, 61877, 4796, 123885, 27922, 122999, 12912, 5047
Offset: 3

Views

Author

Derek Orr, Jul 29 2014

Keywords

Comments

a(n) < n! for all n > 2.
It is believed that a(n) exists for all n > 2.
a(n) = n times (least m such that (n-1)!+m and (n-1)!-m are both prime) = n*A075409(n-1). - Jens Kruse Andersen, Jul 30 2014 [Goldbach's conjecture would then imply that a(n) always exists.]

Examples

			(4!+4)/4 = 7 is prime and (4!-4)/4 = 5 is prime. Thus a(4) = 4.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=0,10^7,s1=(n!-k)/n;s2=(n!+k)/n;if(floor(s1)==s1&&floor(s2)==s2,if(ispseudoprime(s1)&&ispseudoprime(s2),return(k))))
    n=3;while(n<100,print1(a(n),", ");n++)
Showing 1-2 of 2 results.