login
A093820
a(n) = Sum_{k=1..n-1} gcd(n, a(k)) for n > 1; a(1) = 1.
3
1, 1, 2, 4, 4, 8, 6, 22, 10, 24, 20, 42, 12, 36, 32, 64, 16, 64, 18, 82, 50, 60, 22, 144, 60, 48, 64, 96, 28, 172, 30, 282, 78, 64, 70, 256, 36, 72, 106, 254, 80, 204, 84, 176, 166, 88, 92, 518, 78, 200, 136, 210, 104, 244, 134, 346, 96, 112, 58, 538, 120, 120, 216
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
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
Cf. A006579.
Cf. A056144.
Sequence in context: A110794 A117295 A235999 * A095400 A237264 A265560
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 21 2004
EXTENSIONS
Definition corrected by Antti Karttunen, Jun 04 2004
STATUS
approved