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.

A308090 a(n) = gcd(2^n + n!, 3^n + n!, n+1).

Original entry on oeis.org

1, 1, 1, 5, 1, 7, 1, 1, 1, 11, 1, 13, 1, 1, 1, 17, 1, 19, 1, 1, 1, 23, 1, 1, 1, 1, 1, 29, 1, 31, 1, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 1, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 1, 1, 83, 1, 1, 1, 1, 1, 89, 1, 1, 1, 1, 1, 1, 1, 97, 1, 1, 1
Offset: 1

Views

Author

Pedro Caceres, May 11 2019

Keywords

Comments

From observation: For n > 3, if n+1 is prime, then a(n) = n+1.
This implies that (2^n + n!)= 0 mod (n+1) iff (n+1) is prime, and (3^n + n!)= 0 mod (n+1) iff (n+1) is prime.
Conjecture: Conversely, if gcd(2^n + n!, 3^n + n!, n+1) = n+1, then n+1 is prime.
Appears to be the same as A090585(n) except at n=2. - R. J. Mathar, Jul 22 2021

Examples

			a(4) = gcd(2^4 + 4!, 3^4 + 4!, 5) = gcd(40, 105, 5) = 5.
a(5) = gcd(2^5 + 5!, 3^5 + 5!, 6) = gcd(152, 363, 6) = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[2^n+n!,3^n+n!,n+1],{n,100}] (* Harvey P. Dale, Aug 27 2020 *)
  • PARI
    a(n) = gcd([2^n + n!, 3^n + n!, n+1]); \\ Michel Marcus, May 12 2019

Formula

a(n) = gcd(A007611(n), A249945(n), n+1).