OFFSET
1,3
COMMENTS
a(n) = n-1 iff n is prime.
a(n) >= n-1. All terms except a(1) = a(2) = 1 are even. - Ivan Neretin, Apr 06 2016
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
Fold[Append[#1, Total@GCD[#1, #2]] &, {1}, Range[2, 64]] (* Ivan Neretin, Apr 06 2016 *)
PROG
(PARI) lista(nn) = {va = vector(nn); va[1] = 1; for (i = 2, nn, va[i] = sum(k=1, i-1, gcd(i, va[k])); ); va; } \\ Michel Marcus, Oct 04 2013
(Haskell)
a093820 n = a093820_list !! (n-1)
a093820_list = 1 : f [2..] [1] where
f (x:xs) ys = y : f xs (y:ys) where y = sum $ map (gcd x) ys
-- Reinhard Zumkeller, Oct 10 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 21 2004
EXTENSIONS
Definition corrected by Antti Karttunen, Jun 04 2004
STATUS
approved