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!)
A082865 a(n) is the sum of the preceding terms that are coprime to n. 1

%I #8 Apr 27 2017 19:35:54

%S 1,2,3,4,10,1,21,26,44,26,94,2,182,5,382,31,834,38,1668,57,666,119,

%T 4216,157,8574,395,5735,6385,29678,309,49683,62902,80713,143496,

%U 320705,414247,1125010,878510,2929386,545342,6609659,507670,7117329,14284850

%N a(n) is the sum of the preceding terms that are coprime to n.

%H Ivan Neretin, <a href="/A082865/b082865.txt">Table of n, a(n) for n = 1..1000</a>

%e a(6)=1 as 2,3,4 and 10 all have gcd(6,x)>1.

%t a = {1, 2}; Do[AppendTo[a, Total@Select[a, GCD[n, #] == 1 &]], {n, 3, 44}]; a (* _Ivan Neretin_, Apr 27 2017 *)

%o (PARI) { v=vector(100,i,0); v[1]=1; v[2]=2; print1("1,2,"); for (i=3,100, for (j=1,i-1, if (gcd(i,v[j]) == 1,v[i]+=v[j])); print1(v[i]",")) }

%K nonn

%O 1,2

%A _Jon Perry_, May 24 2003

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 April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)