login
A084309
a(n) = gcd(prime(n)-1, n).
10
1, 2, 1, 2, 5, 6, 1, 2, 1, 2, 1, 12, 1, 14, 1, 4, 1, 6, 1, 10, 3, 2, 1, 8, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 6, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 20, 1, 2, 9, 2, 13, 2, 1, 4, 1, 2, 1, 2, 1, 2, 3, 2, 1, 6, 1, 8, 1, 2, 1, 12, 1, 2, 1, 8, 1, 6, 1, 2, 3, 2, 1, 2, 1, 2, 9, 20, 1, 2
OFFSET
1,2
LINKS
MAPLE
A084309:=n->gcd(ithprime(n)-1, n): seq(A084309(n), n=1..150); # Wesley Ivan Hurt, Feb 01 2017
MATHEMATICA
Table[GCD[Prime[w]-1, w], {w, 128}]
PROG
(PARI) a(n) = gcd(prime(n)-1, n); \\ Michel Marcus, Feb 02 2017
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jun 13 2003
STATUS
approved