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.

A362296 Greatest common divisor of composite numbers between the n-th and (n+1)st primes.

Original entry on oeis.org

4, 6, 1, 12, 1, 18, 1, 1, 30, 1, 1, 42, 1, 1, 1, 60, 1, 1, 72, 1, 1, 1, 1, 1, 102, 1, 108, 1, 1, 1, 1, 138, 1, 150, 1, 1, 1, 1, 1, 180, 1, 192, 1, 198, 1, 1, 1, 228, 1, 1, 240, 1, 1, 1, 1, 270, 1, 1, 282, 1, 1, 1, 312, 1, 1, 1, 1, 348, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Chai Wah Wu, Apr 15 2023

Keywords

Crossrefs

Cf. A056831 (LCM), A061214 (product).

Programs

  • PARI
    a(n) = gcd([prime(n)+1..prime(n+1)-1]); \\ Michel Marcus, Apr 16 2023
  • Python
    from sympy import prime, isprime
    def A362296(n): return m-1 if isprime(m:=prime(n)+2) else 1
    

Formula

For n > 1, a(n)=prime(n)+1 if and only if prime(n+1)=prime(n)+2 and a(n)=1 otherwise.