login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A122169
a(1)=1. a(n) = sum of earlier terms, a(k) (1<=k<=n-1), where gcd(a(k),n) is squarefree.
2
1, 1, 2, 4, 8, 16, 32, 4, 68, 136, 272, 4, 548, 1096, 2192, 4, 4388, 8776, 17552, 4, 35108, 70216, 140432, 4, 280868, 561736, 1123472, 4, 2246948, 4493896, 8987792, 4, 17975588, 35951176, 71902352, 4, 143804708, 287609416, 575218832, 4
OFFSET
1,3
LINKS
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
Cf. A122168.
Sequence in context: A318776 A036130 A335836 * A114183 A036129 A319303
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 23 2006
EXTENSIONS
Extended by Ray Chandler, Aug 24 2006
STATUS
approved