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!)
A130043 a(1)=1. a(n) = number of earlier terms which are coprime to the largest odd divisor of n. 1

%I #7 Apr 09 2014 10:14:39

%S 1,1,2,3,4,4,6,7,6,9,10,7,12,11,8,15,16,11,18,17,11,18,22,15,21,25,16,

%T 24,28,16,30,31,16,32,25,23,36,37,25,32,40,25,42,39,23,43,46,32,43,40,

%U 34,50,52,38,39,50,39,57,58,32,60,60,39,63,45,38,66,65,41,47,70,47,72

%N a(1)=1. a(n) = number of earlier terms which are coprime to the largest odd divisor of n.

%e The largest odd divisor of 12 is 3. So a(12) is the number of terms from among (a(1),a(2),...a(11)) which are coprime to 3, which is 7.

%p lod:=proc(n) if n mod 2 = 1 then n else lod(n/2) fi end: seq(lod(n),n=1..100): a[1]:=1: for n from 2 to 100 do a[n]:=0: for j from 1 to n-1 do if igcd(a[j],lod(n))=1 then a[n]:=1+a[n] else fi od: od: seq(a[n],n=1..100); # lod finds the largest odd divisor - _Emeric Deutsch_, May 22 2007

%Y Cf. A130044, A000265.

%K nonn

%O 1,3

%A _Leroy Quet_, May 02 2007

%E More terms from _Emeric Deutsch_, May 22 2007

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 April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)