The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A096217 a(n) = sum of terms of {a(1),a(2),a(3),...a(n-1)} which are coprime to n. 1
1, 1, 2, 2, 6, 2, 14, 2, 24, 2, 56, 2, 114, 2, 86, 2, 318, 2, 524, 2, 632, 2, 1798, 2, 3598, 2, 6736, 2, 12138, 2, 24278, 2, 37756, 2, 72308, 2, 160424, 2, 308250, 2, 629102, 2, 1258120, 2, 937358, 2, 3453688, 2, 3437884, 2, 9395312, 2, 18802902, 2, 36816688, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) is 2 if n is an even integer >= 4.
a(7937) has more than 1000 decimal digits. - Chai Wah Wu, Aug 30 2014
LINKS
EXAMPLE
a(1)=1, a(2)=1, a(3)=2, a(4)=2, a(6)=2, a(7)=14 and a(8)=2 are the terms, prior to a(9), which are coprime to 9. So a(9) = 1 +1 +2 +2 +2 +14 +2 = 24.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Plus @@ (a /@ Select[Range[n - 1], GCD[ a[ # ], n] == 1 &]); Table[ a[n], {n, 56}] (* Robert G. Wilson v, Jul 31 2004 *)
PROG
(Python)
from gmpy2 import gcd
A096217 = [1]
for n in range(2, 10**4):
A096217.append(sum(x for x in A096217 if gcd(x, n) == 1))
# Chai Wah Wu, Aug 30 2014
CROSSREFS
Sequence in context: A071223 A249631 A055934 * A281145 A098555 A057562
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 28 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 31 2004
STATUS
approved

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 June 2 21:38 EDT 2024. Contains 373051 sequences. (Running on oeis4.)