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-5 of 5 results.

A049432 Numbers k such that k! - (k-1)! + 1 is prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 13, 20, 24, 46, 59, 150, 152, 198, 683, 880, 1135, 1907, 6617, 10243, 12016
Offset: 1

Views

Author

Paul Jobling (paul.jobling(AT)whitecross.com)

Keywords

Comments

a(21) > 12000. [From Donovan Johnson, Dec 18 2009]

Examples

			6! - (6-1)! + 1 = 601 is prime.
		

Crossrefs

Formula

a(n) = A090703(n) + 1. - Michael S. Branicky, Jun 11 2025

Extensions

a(15)-a(16) from Farideh Firoozbakht, Jul 18 2003
a(17)-a(20) from Donovan Johnson, Dec 18 2009
a(21) from Michael S. Branicky, Jun 11 2025

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 19, 24, 251, 374, 953, 1104, 1507, 3390, 4443, 5762
Offset: 1

Views

Author

Daniel Suteu, Apr 03 2018

Keywords

Comments

The associated primes are A300559(a(n)) = A180119(a(n))+1 = A001286(a(n)+1)+1. - M. F. Hasler, Apr 10 2018
Looking for primes of the form p(n) = 1 + n! f(n) with a simple polynomial function f, it appears that the choice f(n) = n(n+1)/2 = A000217 is one of the most successful choices for getting a maximum of primes for n = 1..20. - M. F. Hasler, Apr 14 2018
The PFGW program has been used to certify all the terms up to a(23), using a deterministic test which exploits the factorization of a(n) - 1. - Giovanni Resta, Jun 24 2018

Crossrefs

See A302859 for the actual primes.

Programs

  • Mathematica
    Do[ If[ PrimeQ[n(n +1)!/2 +1], Print@ n], {n, 4000}] (* Robert G. Wilson v, Apr 05 2018 *)
  • PARI
    isok(k) = ispseudoprime((k+1)! * k / 2 + 1);

Extensions

a(21) from Robert G. Wilson v, Apr 05 2018
a(22) from Vaclav Kotesovec, Apr 06 2018
a(23) from Giovanni Resta, Jun 24 2018

A346167 Primes p such that p*p! + 1 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 19, 23, 149, 151, 197, 37691
Offset: 1

Views

Author

Reza K Ghazi, Jul 08 2021

Keywords

Crossrefs

Prime terms of A090703.
Cf. A346168.

Programs

  • Maple
    select(p -> isprime(p) and isprime(p*factorial(p) + 1), [$2 .. 200]);
  • Mathematica
    Select[Range[2, 200], PrimeQ[#] && PrimeQ[#*#! + 1] &]
    Select[Prime[Range[100]],PrimeQ[#*#!+1]&] (* Harvey P. Dale, Mar 21 2025 *)
  • PARI
    a = List(); for(p=2, 200, if(isprime(p) && isprime(p*p!+1), listput(a, p))); a
    
  • Sage
    [p for p in range(2, 200) if is_prime(p) and is_prime(p*factorial(p) + 1)]

Extensions

a(10) from Georg Grasegger, Apr 07 2025

A346168 Primes p such that p*p! - 1 is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 397, 599, 2239
Offset: 1

Views

Author

Reza K Ghazi, Jul 08 2021

Keywords

Comments

a(9) > 10^4.

Crossrefs

Prime terms of A090704.

Programs

  • Maple
    select(p -> isprime(p) and isprime(p*factorial(p) - 1), [$2 .. 600])
  • Mathematica
    Select[Range[2, 600], PrimeQ[#] && PrimeQ[#*#! - 1] &]
    Select[Prime[Range[110]],PrimeQ[# #!-1]&] (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Feb 12 2025 *)
  • PARI
    a = List(); for(p=2, 600, if(isprime(p) && isprime(p*p!-1), listput(a, p))); a
    
  • Sage
    [p for p in range(2, 600) if is_prime(p) and is_prime(p*factorial(p) - 1)]

A382392 a(n) is the least prime number whose factorial base expansion contains the digit n.

Original entry on oeis.org

2, 2, 5, 19, 97, 601, 4327, 35281, 322571, 3265949, 36288017, 439084817, 5748019201, 80951270459, 1220496076831, 19615115520037, 334764638208037, 6046686277632071, 115242726703104073, 2311256907767808001, 48658040163532800037, 1072909785605898240031
Offset: 0

Views

Author

Rémy Sigrist, Mar 23 2025

Keywords

Comments

This sequence is well defined: a(0) = a(1) = 2, and for n > 1, (n+1)! and n*n! + 1 are coprime, so by Dirichlet's theorem on arithmetic progressions, there exists a prime number p of the form k*(n+1)! + n*n! + 1 for some k >= 0, and the factorial base expansion of this prime number contains the digit n, hence a(n) <= p.

Examples

			The initial terms, in decimal and in factorial base, are:
  n  a(n)     fact(a(n))
  -  -------  -----------------
  0        2  1,0
  1        2  1,0
  2        5  2,1
  3       19  3,0,1
  4       97  4,0,0,1
  5      601  5,0,0,0,1
  6     4327  6,0,0,1,0,1
  7    35281  7,0,0,0,0,0,1
  8   322571  8,0,0,0,0,1,2,1
  9  3265949  9,0,0,0,0,1,0,2,1
		

Crossrefs

Programs

  • PARI
    a(n) = { forprime (p = n*n!, oo, my (q = p); for (r = 2, oo, if (q==0, break, q % r==n, return (p), q \= r););); }

Formula

a(n) > A001563(n).
Showing 1-5 of 5 results.