login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097562 a(n) = number of terms among {a(1), a(2), a(3), ..., a(n-1)} that are coprime to n; a(1)=5. 1
5, 1, 2, 2, 3, 2, 6, 3, 5, 3, 10, 3, 12, 7, 5, 9, 16, 5, 18, 7, 10, 12, 22, 7, 18, 13, 16, 11, 28, 6, 30, 15, 17, 16, 22, 11, 36, 18, 22, 13, 40, 10, 42, 17, 20, 20, 46, 14, 42, 15, 30, 19, 52, 15, 34, 20, 35, 24, 58, 11, 60, 25, 34, 26, 41, 16, 66, 25, 44, 15, 70, 20, 72, 29, 33, 30 (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..76.

EXAMPLE

a(8)=3 because among the first seven terms, namely 5,1,2,2,3,2,6, there are 3 terms that are relatively prime to 8 (5,1 and 3).

MAPLE

a[1]:=5: 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

MATHEMATICA

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

CROSSREFS

Cf. A096216.

Sequence in context: A068115 A068139 A140987 * A275889 A046771 A029762

Adjacent sequences:  A097559 A097560 A097561 * A097563 A097564 A097565

KEYWORD

nonn

AUTHOR

Leroy Quet, Aug 27 2004

EXTENSIONS

More terms from Emeric Deutsch, Aug 03 2005

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 5 03:37 EDT 2020. Contains 335459 sequences. (Running on oeis4.)