cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A093820 a(n) = Sum_{k=1..n-1} gcd(n, a(k)) for n > 1; a(1) = 1.

This page as a plain text file.
%I A093820 #20 Oct 19 2019 03:20:17
%S A093820 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,
%T A093820 48,64,96,28,172,30,282,78,64,70,256,36,72,106,254,80,204,84,176,166,
%U A093820 88,92,518,78,200,136,210,104,244,134,346,96,112,58,538,120,120,216
%N A093820 a(n) = Sum_{k=1..n-1} gcd(n, a(k)) for n > 1; a(1) = 1.
%C A093820 a(n) = n-1 iff n is prime.
%C A093820 a(n) >= n-1. All terms except a(1) = a(2) = 1 are even. - _Ivan Neretin_, Apr 06 2016
%H A093820 Reinhard Zumkeller, <a href="/A093820/b093820.txt">Table of n, a(n) for n = 1..10000</a>
%t A093820 Fold[Append[#1, Total@GCD[#1, #2]] &, {1}, Range[2, 64]] (* _Ivan Neretin_, Apr 06 2016 *)
%o A093820 (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
%o A093820 (Haskell)
%o A093820 a093820 n = a093820_list !! (n-1)
%o A093820 a093820_list = 1 : f [2..] [1] where
%o A093820    f (x:xs) ys = y : f xs (y:ys) where y = sum $ map (gcd x) ys
%o A093820 -- _Reinhard Zumkeller_, Oct 10 2013
%Y A093820 Cf. A006579.
%Y A093820 Cf. A056144.
%K A093820 nonn
%O A093820 1,3
%A A093820 _Reinhard Zumkeller_, May 21 2004
%E A093820 Definition corrected by _Antti Karttunen_, Jun 04 2004