login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097560 a(n) = number of terms among {a(1), a(2), a(3), ..., a(n-1)} that are coprime to n; a(1)=3. 1
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; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

A family of related sequences can be generated using different positive integers for a(1). a(1)=1 gives sequence A096216.

LINKS

Table of n, a(n) for n=1..79.

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, Aug 03 2005

MATHEMATICA

a[1] = 3; a[n_] := a[n] = Count[ GCD[ Table[ a[i], {i, n - 1}], n], 1]; Array[a, 79] (* Robert G. Wilson v, Dec 27 2005 *)

CROSSREFS

Cf. A096216.

Sequence in context: A035690 A124794 A206496 * A218905 A027960 A247282

Adjacent sequences:  A097557 A097558 A097559 * A097561 A097562 A097563

KEYWORD

nonn

AUTHOR

Leroy Quet, Aug 27 2004

EXTENSIONS

More terms from John W. Layman, Sep 27 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 5 21:40 EST 2016. Contains 278771 sequences.