login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122169 a(1)=1. a(n) = sum of earlier terms, a(k) (1<=k<=n-1), where gcd(a(k),n) is squarefree. 2

%I #13 Sep 06 2019 10:59:13

%S 1,1,2,4,8,16,32,4,68,136,272,4,548,1096,2192,4,4388,8776,17552,4,

%T 35108,70216,140432,4,280868,561736,1123472,4,2246948,4493896,8987792,

%U 4,17975588,35951176,71902352,4,143804708,287609416,575218832,4

%N a(1)=1. a(n) = sum of earlier terms, a(k) (1<=k<=n-1), where gcd(a(k),n) is squarefree.

%H Michel Marcus, <a href="/A122169/b122169.txt">Table of n, a(n) for n = 1..1000</a>

%e (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.

%t 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 *)

%o (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

%Y Cf. A122168.

%K nonn

%O 1,3

%A _Leroy Quet_, Aug 23 2006

%E Extended by _Ray Chandler_, Aug 24 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)