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!)
A125842 a(1)=1. a(n) = the number of terms from among the first floor(n/2) terms of the sequence which are coprime to n. 1

%I #9 Oct 10 2019 15:31:58

%S 1,1,1,2,2,3,3,3,4,3,5,3,6,5,5,6,8,3,9,7,6,8,11,4,11,9,7,10,14,3,15,

%T 11,9,11,14,6,18,13,10,11,20,6,21,14,9,15,23,8,23,13,15,17,26,10,22,

%U 16,17,18,29,7,30,20,15,21,27,8,33,23,20,17,35,12,36,23,17,24,30,12,39,21,24

%N a(1)=1. a(n) = the number of terms from among the first floor(n/2) terms of the sequence which are coprime to n.

%e The first floor(15/2) terms of the sequence are 1,1,1,2,2,3,3. Of these, five terms (1,1,1,2,2) are coprime to 15. So a(15) = 5.

%t f[l_List] := Block[{n = Length[l] + 1},Append[l, Length[Select[Take[l, Floor[n/2]], GCD[ #, n] == 1 &]]]];Nest[f, {1}, 80] (* _Ray Chandler_, Dec 11 2006 *)

%Y Cf. A125843.

%K nonn

%O 1,4

%A _Leroy Quet_, Dec 10 2006

%E Extended by _Ray Chandler_, Dec 11 2006

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 8 09:36 EDT 2024. Contains 373217 sequences. (Running on oeis4.)