OFFSET
1,3
LINKS
Michel Marcus, Table of n, a(n) for n = 1..1000
EXAMPLE
(1,1,2,4,4,4,4,4,4,4,4) is gcd(a(k),12), for 1 <= k <=11. Of these integers, only the first 3 are squarefree, so a(12) = a(1)+a(2)+a(3) = 4.
MATHEMATICA
sf[n_] := Max @@ Last /@ FactorInteger[n] < 2; f[s_] := Append[s, Plus @@ Select[s, sf[GCD[ #, Length[s] + 1]] &]]; Nest[f, {1}, 40] (* Ray Chandler, Aug 24 2006 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = sum(k=1, n-1, if (issquarefree(gcd(va[k], n)), va[k])); ); va; } \\ Michel Marcus, Sep 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 23 2006
EXTENSIONS
Extended by Ray Chandler, Aug 24 2006
STATUS
approved