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.

Previous Showing 71-80 of 111 results. Next

A139203 Numbers k such that (k!-8)/8 is prime.

Original entry on oeis.org

4, 6, 8, 10, 11, 16, 19, 47, 66, 183, 376, 507, 1081, 1204, 12111, 23181
Offset: 1

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

a(17) > 25000. - Robert Price, Oct 08 2016

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime((1/8)*factorial(n)-1)=true then n else end if end proc: seq(a(n),n=4..550); # Emeric Deutsch, May 07 2008
  • Mathematica
    a = {}; Do[If[PrimeQ[(n! - 8)/8], Print[a]; AppendTo[a, n]], {n, 1, 300}]; a

Extensions

2 more terms from Emeric Deutsch, May 07 2008
More terms from Serge Batalov, Feb 18 2015
a(15)-a(16) from Robert Price, Oct 08 2016

A139204 Numbers k such that (k!-9)/9 is prime.

Original entry on oeis.org

6, 15, 17, 18, 21, 27, 29, 30, 37, 47, 50, 64, 125, 251, 602, 611, 1184, 1468, 5570, 10679, 15798, 21237
Offset: 1

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

a(20) > 10000. The PFGW program has been used to certify all the terms up to a(19), using a deterministic test which exploits the factorization of a(n) + 1. - Giovanni Resta, Mar 28 2014
a(23) > 25000. - Robert Price, Mar 29 2017

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[(n! - 9)/9], Print[a]; AppendTo[a, n]], {n, 1, 300}]; a
  • PARI
    for(n=1,1000,if(floor(n!/9-1)==n!/9-1,if(ispseudoprime(n!/9-1),print(n)))) \\ Derek Orr, Mar 28 2014

Extensions

a(14)-a(16) from Derek Orr, Mar 28 2014
a(17)-a(19) from Giovanni Resta, Mar 28 2014
a(20)-a(22) from Robert Price, Mar 29 2017

A151894 Numbers k such that k! + second prime after k! is prime.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 11, 17, 42, 66, 76, 93, 139, 157, 226, 290, 415, 522, 774, 794, 1947
Offset: 1

Views

Author

Artur Jasinski, Apr 12 2008

Keywords

Comments

Because numbers of the form (k! + prime) are divisible by all primes <= k that means that the first prime number can have the form k! + next prime after k! and no primes of the form k! + m for m > 1 and m < next prime after k!.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[n! + NextPrime[n!,2]], AppendTo[a, n]], {n, 200}]; a
  • PARI
    is(k) = {my(f = k!); isprime(f + nextprime(nextprime(f + 1) + 1));} \\ Amiram Eldar, Oct 23 2024

Extensions

a(15)-a(20) from Amiram Eldar, Oct 23 2024
a(21) from Michael S. Branicky, Oct 24 2024

A163077 Numbers k such that k$ + 1 is prime. Here '$' denotes the swinging factorial function (A056040).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 9, 14, 15, 24, 27, 31, 38, 44, 45, 49, 67, 76, 92, 99, 119, 124, 133, 136, 139, 144, 168, 171, 185, 265, 291, 332, 368, 428, 501, 631, 680, 689, 696, 765, 789, 890, 1034, 1233, 1384, 1517, 1615, 1634, 1809, 2632, 2762, 3925, 4419, 5108, 5426
Offset: 1

Views

Author

Peter Luschny, Jul 21 2009

Keywords

Examples

			0$ + 1 = 1 + 1 = 2 is prime, so 0 is in the sequence.
		

Crossrefs

Programs

  • Maple
    a := proc(n) select(x -> isprime(A056040(x)+1),[$0..n]) end:
  • Mathematica
    fQ[n_] := PrimeQ[1 + 2^(n - Mod[n, 2])*Product[k^((-1)^(k + 1)), {k, n}]]; Select[ Range[0, 8660], fQ] (* Robert G. Wilson v, Aug 09 2010 *)
  • PARI
    is(k) = ispseudoprime(1+k!/(k\2)!^2); \\ Jinyuan Wang, Mar 22 2020

Extensions

a(45)-a(56) from Robert G. Wilson v, Aug 09 2010

A231901 Least k > n such that k!/n! + 1 is a prime, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 4, 4, 6, 6, 11, 9, 11, 10, 20, 12, 15, 15, 16, 16, 18, 18, 23, 21, 22, 22, 40, 25, 27, 31, 28, 28, 37, 30, 42, 38, 34, 36, 42, 36, 110, 39, 43, 40, 42, 42, 56, 46, 50, 46, 55, 65, 51, 51, 53, 52, 55, 55, 73, 58, 58, 58, 60, 60, 63, 63, 177, 68, 70, 66, 82, 72
Offset: 0

Views

Author

Alex Ratushnyak, Nov 15 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Table[k = n + 1; While[! PrimeQ[k!/n! + 1], k++]; k, {n, 100}] (* T. D. Noe, Nov 18 2013 *)
  • PARI
    a(n) = {my(m = n+1); while(! isprime(m!/n! +1), m++); m;} \\ Michel Marcus, Mar 07 2014; corrected Jun 13 2022

A242487 Numbers k such that (2*k)! + k! + 1 is prime.

Original entry on oeis.org

0, 3, 8, 13, 19, 423, 585, 2746, 2855
Offset: 1

Views

Author

Seiichi Manyama, Mar 22 2018

Keywords

Comments

a(10) > 10000. - Michael S. Branicky, May 03 2025

Examples

			0! + 0! + 1 =   3 is prime.
6! + 3! + 1 = 727 is prime.
		

Crossrefs

A300947 gives the primes.

Programs

  • Maple
    select(k->isprime(factorial(2*k)+factorial(k)+1),[$0..600]); # Muniru A Asiru, May 27 2018
  • Mathematica
    Flatten[{0, Select[Range[100], PrimeQ[(2*#)! + #! + 1] &]}] (* Vaclav Kotesovec, Mar 25 2018 *)
  • PARI
    isok(k) = ispseudoprime((2*k)!+k!+1); \\ Altug Alkan, Mar 22 2018

Extensions

a(8)-a(9) from Michael S. Branicky, Apr 16 2023

A340013 The prime gap, divided by two, which surrounds n!.

Original entry on oeis.org

1, 3, 7, 4, 6, 27, 15, 11, 7, 15, 45, 10, 45, 38, 45, 39, 95, 30, 31, 52, 93, 102, 95, 48, 22, 84, 127, 54, 94, 40, 19, 145, 87, 129, 49, 22, 85, 68, 66, 88, 90, 78, 146, 95, 156, 78, 71, 79, 225, 60, 65, 175, 66, 305, 192, 196, 215, 205, 420, 101, 186, 213, 160
Offset: 3

Views

Author

Robert G. Wilson v, Jan 09 2021

Keywords

Comments

A theorem states that between (n+1)! + 2 and (n+1)! + (n+1) inclusive, there are n consecutive composite integers, namely 2, 3, 4, ..., n, n+1.
Records: 1, 3, 7, 27, 45, 95, 102, 127, 145, 146, 156, 225, 305, 420, 804, 844, 1173, 1671, 1725, 1827, 2570, 2930, 3318, 5142, 5946, 6837, 7007, 8208, 10221, ..., .

Examples

			For a(1), there are no positive primes which surround 1!. Therefore a(1) is undefined.
For a(2), there are two contiguous primes {2, 3} with 2 being 2!. The prime gap is 1. However, the two primes do not surround 2!, so a(2) is undefined.
For a(3), the following set of numbers, {5, 6, 7}, with 3! being in the middle. The prime gap is 2; therefore, a(3) = 1.
For a(4), the following set of numbers, {23, 24, 25, 26, 27, 28, 29} with 4! in between the two primes 23 & 29. The prime gap is 6, so a(4) = 3.
		

Crossrefs

Programs

  • Maple
    a:= n-> (f-> (nextprime(f-1)-prevprime(f+1))/2)(n!):
    seq(a(n), n=3..70);  # Alois P. Heinz, Jan 09 2021
  • Mathematica
    a[n_] := (NextPrime[n!, 1] - NextPrime[n!, -1])/2; Array[a, 70, 3]
  • PARI
    a(n) = (nextprime(n!+1) - precprime(n!-1))/2; \\ Michel Marcus, Jan 11 2021
    
  • Python
    from sympy import factorial, nextprime, prevprime
    def A340013(n):
        f = factorial(n)
        return (nextprime(f)-prevprime(f))//2 # Chai Wah Wu, Jan 23 2021

Formula

a(n) = (A037151(n) - A006990(n))/2 = (A033932(n) + A033933(n))/2.
a(n) = A054588(n)/2 = A058054(n)/2. - Alois P. Heinz, Jan 09 2021

A064295 Numbers k such that every (prime) factor of k!+1 is one more than a multiple of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 25, 27, 28, 37, 41, 46, 73, 77, 116
Offset: 1

Views

Author

Don Reble, Sep 25 2001

Keywords

Comments

a(20) >= 140. - Max Alekseyev, Feb 19 2024

Examples

			46 is in the list because 46!+1 = 47 * 268662306503771535067 * 435777793891607546778854755077304349 and all of those factors are = 1 mod 46.
		

Crossrefs

Complement of A064164, superset of A002981.

Extensions

a(19) from Amiram Eldar, Oct 03 2019

A084727 Primes arising in A084726.

Original entry on oeis.org

2, 3, 7, 281, 76561, 576577, 17873857, 643458817, 337767408001, 21617114112001, 39916801, 119715577952256001, 1980990543353657472001, 26582634158080001, 3577861898239093446857008573440001, 711975497511453268455460274177
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003

Keywords

Comments

Smallest prime of the form: 1 + product of n terms of an arithmetic progression with first term 1.
Conjecture: All terms exist.
If n! + 1 is prime (A002981) then a(n) = A088332(n). - Hugo Pfoertner, Nov 18 2004

Examples

			a(1) = 2 = 1 + 1;
a(4) = 281 = 1*4*7*10 + 1 (1*2*3*4 + 1 = 25 is composite);
a(5) = 76561 = 1*8*15*22*29 + 1.
		

Crossrefs

Programs

  • Maple
    A084727 := proc(n) local k,p: for k from 1 do p:=1+mul(1+j*k,j=0..n-1): if(isprime(p))then return p: fi: od: end: seq(A084727(n),n=1..16); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    np[n_]:=Module[{k=1},While[!PrimeQ[Times@@NestList[k+#&,1,n-1]+1],k++];Times@@NestList[k+#&,1,n-1]+1]; Array[np,20] (* Harvey P. Dale, Aug 05 2021 *)

Formula

a(n) = 1 + Product_{i = 0..n-1} (1 + i*A084726(n)). - David Wasserman, Jan 03 2005

Extensions

More terms from David Wasserman, Jan 03 2005

A093621 Smallest k>0 such that n!/k!+1 is prime.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 2, 2, 4, 3, 1, 5, 2, 3, 4, 2, 3, 5, 19, 10, 3, 5, 4, 5, 7, 5, 1, 6, 21, 2, 9, 15, 15, 13, 10, 27, 1, 4, 37, 14, 1, 4, 2, 34, 5, 8, 18, 24, 2, 13, 5, 11, 35, 48, 11, 7, 48, 27, 21, 30, 5, 43, 7, 4, 46, 13, 24, 16, 60, 12, 34, 5, 1, 38, 14, 28, 1, 10, 24, 50, 5, 3, 42, 40, 28
Offset: 0

Views

Author

Hugo Pfoertner, Apr 06 2004

Keywords

Comments

The results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 14 2019

Examples

			a(39) =37 because 39!/k!+1 is composite for all k=1..36; 39!/37!+1=39*38+1=1483 is prime.
		

Crossrefs

Cf. A093437 largest prime of the form n!/k!+1, A002981 n!+1 is prime, A093623 Smallest k>0 such that n!/k!-1 is prime.

Formula

a(A002981(n)) = 1.
Previous Showing 71-80 of 111 results. Next