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!)
A127075 a(1)=1. a(n) = a(n-1) + (sum of the earlier terms {among terms a(1) through a(n-1)} which are coprime to n). 2

%I #13 Oct 10 2019 11:52:00

%S 1,2,5,11,25,67,178,287,863,2092,5612,6871,22885,53613,69597,223822,

%T 385931,802877,2308019,5936156,12937623,29456690,81587807,166703456,

%U 437728341,973247233,2233938123,4919445412,13784085189,14842425156

%N a(1)=1. a(n) = a(n-1) + (sum of the earlier terms {among terms a(1) through a(n-1)} which are coprime to n).

%H Robert Israel, <a href="/A127075/b127075.txt">Table of n, a(n) for n = 1..3121</a>

%e The terms of the sequence, among terms a(1) through a(5), which are coprime to 6 are a(1)=1, a(3)=5, a(4)=11 and a(5)=25. So a(6) = a(5) +1 +5 +11 +25 = 67.

%p A[1]:= 1:

%p for n from 2 to 100 do

%p A[n]:= A[n-1]+convert(select(t -> igcd(t,n)=1, [seq(A[i],i=1..n-1)]),`+`)

%p od:

%p seq(A[i],i=1..100); # _Robert Israel_, Aug 23 2019

%t f[l_List] := Append[l, l[[ -1]] + Plus @@ Select[l, GCD[ #, Length[l] + 1] == 1 &]];Nest[f, {1}, 30] (* _Ray Chandler_, Jan 06 2007 *)

%Y Cf. A127076.

%K nonn

%O 1,2

%A _Leroy Quet_, Jan 04 2007

%E Extended by _Ray Chandler_, Jan 06 2007

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 September 1 06:23 EDT 2024. Contains 375575 sequences. (Running on oeis4.)