A362296 Greatest common divisor of composite numbers between the n-th and (n+1)st primes.
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
Keywords
Links
- Winston de Greef, Table of n, a(n) for n = 2..10000
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.