|
Search: id:A097560
|
|
|
| A097560 |
|
a(n) = number of terms among {a(1),a(2),a(3),...a(n-1)} which are coprime to n; a(1)=3. |
|
+0 2
|
|
| 3, 1, 1, 3, 4, 2, 6, 4, 5, 4, 10, 3, 12, 6, 6, 6, 16, 3, 18, 6, 9, 8, 22, 3, 22, 9, 12, 10, 28, 2, 30, 10, 14, 10, 26, 3, 36, 11, 19, 12, 40, 5, 42, 13, 17, 16, 46, 8, 45, 14, 28, 16, 52, 8, 42, 17, 33, 19, 58, 8, 60, 20, 34, 20, 49, 10, 66, 19, 42, 18, 70, 12, 72, 22, 34, 19, 61, 13, 78
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
A family of related sequences can be generated using different positive integers for a(1). a(1)=1 gives sequence A096216.
|
|
EXAMPLE
|
a(8)=4 because among the first seven terms, namely 3,1,1,3,4,2,6, there are 4 terms that are relatively prime to 8 (3,1,1, and 3).
|
|
MAPLE
|
a[1]:=3: for n from 2 to 100 do s:=0: for j from 1 to n-1 do if gcd(a[j], n)=1 then s:=s+1 else s:=s fi od: a[n]:=s: od: seq(a[n], n=1..84); (Emeric Deutsch (deutsch(AT)duke.poly.edu), Aug 03 2005)
|
|
MATHEMATICA
|
a[1] = 3; a[n_] := a[n] = Count[ GCD[ Table[ a[i], {i, n - 1}], n], 1]; Array[a, 79] (from Robert G. Wilson v (rgwv(at)rgwv.com), Dec 27 2005)
|
|
CROSSREFS
|
Cf. A096216.
Sequence in context: A117184 A035690 A124794 this_sequence A027960 A131248 A116445
Adjacent sequences: A097557 A097558 A097559 this_sequence A097561 A097562 A097563
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Aug 27 2004
|
|
EXTENSIONS
|
More terms from John W. Layman (layman(AT)math.vt.edu), Sep 27 2004
|
|
|
Search completed in 0.002 seconds
|