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: Mohamed Sami Gattoufi

Mohamed Sami Gattoufi's wiki page.

Mohamed Sami Gattoufi has authored 5 sequences.

A336481 a(n) is the smallest positive k such that Fibonorial(n) - k is a prime, for n>3.

Original entry on oeis.org

1, 1, 1, 1, 1, 11, 19, 19, 29, 19, 1, 1, 97, 41, 23, 131, 107, 53, 101, 529, 53, 269, 347, 97, 317, 97, 353, 73, 97, 193, 71, 1543, 661, 257, 193, 191, 151, 443, 167, 967, 251, 2441, 163, 151, 379, 229, 127, 59, 1223, 911, 389, 349, 919, 179, 1051, 167, 547, 541
Offset: 4

Author

Mohamed Sami Gattoufi, Jul 22 2020

Keywords

Examples

			For n=5, a(5) = Fibonorial(5) - 1 = 30 - 1 = 29 is a prime.
		

Crossrefs

Cf. A003266, A059709 (locations of 1's), A336480.

Programs

  • Mathematica
    Table[(Fibonorial[n]-NextPrime[Fibonorial[n],-1]),{n,4,50}]
  • PARI
    f(n) = prod(i=1, n, fibonacci(i)); \\ A003266
    a(n) = my(fn=f(n)); fn - precprime(fn-1); \\ Michel Marcus, Jul 23 2020

A336480 a(n) is the smallest positive k such that Fibonorial(n) + k is a prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 37, 23, 47, 37, 29, 19, 47, 59, 19, 37, 71, 59, 31, 1, 239, 101, 739, 409, 43, 1, 167, 251, 73, 71, 419, 1567, 107, 83, 223, 191, 227, 449, 97, 173, 103, 523, 79, 137, 223, 1163, 661, 103, 103, 541, 227, 2383, 433, 71, 1069, 643, 251
Offset: 1

Author

Mohamed Sami Gattoufi, Jul 22 2020

Keywords

Examples

			For n=5, Fibonorial(5) + 1 = 30 + 1 = 31 is a prime.
		

Crossrefs

Cf. A003266, A053408 (locations of 1's), A336481.

Programs

  • Mathematica
    Table[(NextPrime[Fibonorial[n]]-Fibonorial[n]),{n,1,50}]
    NextPrime[#]-#&/@Fibonorial[Range[60]] (* Harvey P. Dale, Dec 24 2023 *)
  • PARI
    f(n) = prod(i=1, n, fibonacci(i)); \\ A003266
    a(n) = my(fn=f(n)); nextprime(fn+1) - fn; \\ Michel Marcus, Jul 23 2020

A332731 a(n) is the smallest positive k such that n!*prime(n) - k is a prime.

Original entry on oeis.org

1, 1, 1, 1, 11, 11, 1, 13, 1, 17, 1, 1, 53, 17, 1, 29, 23, 31, 23, 1, 29, 67, 31, 31, 43, 29, 181, 1, 83, 41, 101, 79, 179, 79, 43, 83, 47, 83, 163, 79, 53, 73, 59, 67, 347, 223, 67, 53, 97, 1, 157, 73, 1, 229, 101, 1, 263, 103, 101, 163, 139, 599, 103, 197, 73, 433, 313, 73
Offset: 2

Author

Mohamed Sami Gattoufi, Feb 21 2020

Keywords

Comments

Equivalently, a(n) = n!*prime(n) minus the previous prime.

Examples

			For n=3, n!*prime(n) = 3!*prime(3) = 6*5 = 30, and the largest prime < 30 is 29, so a(3) = 30 - 29 = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[With[{c=n!Prime[n]},c-NextPrime[c,-1]],{n,2,70}] (* Harvey P. Dale, Sep 01 2024 *)
  • PARI
    a(n) = my(x=n!*prime(n)); x - precprime(x); \\ Michel Marcus, Feb 22 2020

Formula

a(n) = n!*prime(n) - A007917(n!*prime(n)).

A332733 a(n) is the smallest positive k such that n!*prime(n) + k is a prime.

Original entry on oeis.org

1, 1, 1, 5, 1, 11, 11, 11, 1, 11, 23, 43, 19, 41, 17, 29, 1, 19, 71, 157, 1, 23, 79, 67, 47, 53, 37, 53, 31, 67, 73, 223, 307, 67, 1, 197, 151, 43, 43, 157, 89, 137, 47, 127, 173, 97, 89, 79, 223, 79, 83, 151, 163, 89, 167, 313, 179, 101, 127, 101, 181, 193, 421, 73
Offset: 1

Author

Mohamed Sami Gattoufi, Feb 21 2020

Keywords

Comments

k equals nextprime(n!*prime(n)) - n!*prime(n).

Crossrefs

Programs

  • Mathematica
    spk[n_]:=Module[{c=n!Prime[n]},NextPrime[c]-c]; Array[spk,70] (* Harvey P. Dale, Aug 13 2021 *)
  • PARI
    a(n) = my(x=n!*prime(n)); nextprime(x+1) - x; \\ Michel Marcus, Feb 22 2020

Formula

a(n) = A151800(n!*prime(n)) - n!*prime(n).

A309671 Primes prime(m) such that G = prime(m-1)# - prime(m) is prime.

Original entry on oeis.org

7, 11, 13, 17, 23, 83, 89, 97, 151, 373, 433, 857, 4013, 8821, 12959
Offset: 1

Author

Mohamed Sami Gattoufi, Aug 11 2019

Keywords

Comments

G = prime(n-1)# - prime(n) where G is a prime is a special case of A090188 where (k=1).

Examples

			7 is a term because 23 = 2*3*5 - 7 is prime.
		

Programs

  • PARI
    primo(p) = my(ip=primepi(p)); factorback(primes(ip)); \\ A002110
    isok(p) = isprime(p) && isprime(primo(precprime(p-1)) - p);