OFFSET
2,1
FORMULA
a(n) = p + A006530(p-1) where p = prime(n).
EXAMPLE
a(2) = prime(2) + gpf(prime(2) - 1) = 3 + gpf(2) = 3 + 2 = 5.
PROG
(PARI) cminuspm2(n) = \\ prime + maxprime of prime-1
{ forprime(x=5, n, forstep(p=x, 2, -1, if(isprime(p) & (x-1)%p==0, print1(x+p, ", "); break); ) ) }
(PARI) a(n) = my(p=prime(n)); p+vecmax(factor(p-1)[, 1]); \\ Michel Marcus, May 07 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Aug 12 2003
EXTENSIONS
Offset 2 and a(2) from Michel Marcus, May 07 2024
Edited by Jon E. Schoenfield, May 07 2024
STATUS
approved