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.

User: Reza K Ghazi

Reza K Ghazi's wiki page.

Reza K Ghazi has authored 6 sequences.

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

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)]

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

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

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

Original entry on oeis.org

1, 3, 5, 15, 20, 44, 45, 73, 80, 93, 295, 5395
Offset: 1

Author

Reza K Ghazi, Jun 07 2021

Keywords

Comments

a(13) > 10^4.

Crossrefs

Programs

  • Maple
    select(k -> isprime((2*k+1)*k!-1), [$1 .. 300])[];
  • Mathematica
    Do[If[PrimeQ[(2*k + 1)*Factorial[k] - 1], Print[k]], {k, 1, 3000}]
  • PARI
    for(k=1, 3000, if(isprime((2*k+1)*k!-1), print1(k", ")))
    
  • SageMath
    for k in range(1, 3000):
        if is_prime((2*k+1)*factorial(k) - 1):
            print(k)

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

Original entry on oeis.org

0, 2, 3, 5, 11, 18, 68, 77, 124, 173, 205, 293, 1037, 1530, 1905, 2342, 3401, 4372, 4679, 5385
Offset: 1

Author

Reza K Ghazi, Jun 07 2021

Keywords

Comments

a(21) > 10^4.

Crossrefs

Programs

  • Maple
    select(k -> isprime((2*k+1)*k!+1), [$0 .. 300])[];
  • Mathematica
    Do[If[PrimeQ[(2*k + 1)*Factorial[k] + 1], Print[k]], {k, 0, 3000}]
  • PARI
    for(k=0, 3000, if(isprime((2*k+1)*k!+1), print1(k", ")))
    
  • SageMath
    for k in range(3000):
        if is_prime((2*k+1)*factorial(k) + 1):
            print(k)

A344170 Numbers k such that 3^(2*k+1) - 3^k - 1 is prime.

Original entry on oeis.org

1, 2, 5, 6, 7, 10, 17, 25, 31, 88, 95, 137, 141, 416, 610, 781, 800, 2353, 7291, 9627, 9749, 15946, 19215
Offset: 1

Author

Reza K Ghazi, May 10 2021

Keywords

Comments

a(24) > 20000.

Crossrefs

Cf. A344263.

Programs

  • Maple
    for k from 1 to 3000 do if isprime(3^(2*k + 1) - 3^k - 1) then print(k); end if; end do
  • Mathematica
    Do[If[PrimeQ[3^(2k + 1) - 3^k - 1], Print[k]], {k, 1, 3000}]
  • PARI
    for(k=1, 3e3, if(isprime(3^(2*k+1)-3^k-1), print1(k", ")))
    
  • SageMath
    for k in range(1, 3000):
        if is_prime(3^(2 * k + 1) - 3^k - 1):
            print(k)

Extensions

a(19)-a(21) from Michael S. Branicky, May 11 2021
a(22)-a(23) from Reza K Ghazi, May 14 2021

A344263 Numbers m such that 3^(2m+1) - 3^m + 1 is prime.

Original entry on oeis.org

0, 3, 4, 11, 35, 56, 88, 104, 476, 1367, 1707, 2472, 22232, 25260
Offset: 1

Author

Reza K Ghazi, May 13 2021

Keywords

Comments

a(14) > 30000.
a(14) > 50000. - Michael S. Branicky, Aug 12 2024

Crossrefs

Cf. A344170.

Programs

  • Maple
    for m from 0 to 3000 do if isprime(3^(2*m + 1) - 3^m + 1) then print(m); end if; end do;
  • Mathematica
    Do[If[PrimeQ[3^(2 m + 1) - 3^m + 1], Print[m]], {m, 0, 3000}]
    Select[Range[0,2500],PrimeQ[3^(2#+1)-3^#+1]&] (* Harvey P. Dale, Mar 01 2023 *)
  • PARI
    for(m=0, 3e3, if(isprime(3^(2*m+1)-3^m+1), print1(m", ")))
    
  • SageMath
    for m in range(3000):
        if is_prime(3^(2*m + 1) - 3^m + 1):
            print(m)