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!)
A128864 a(0)=a(1)=1. For n>=2, a(n) = number of positive divisors of n that are coprime to (a(n-1) + a(n-2)). 1

%I #10 Aug 18 2015 00:22:04

%S 1,1,1,2,3,1,2,2,1,1,2,2,2,2,2,4,1,2,2,2,2,4,2,2,2,3,4,4,2,2,4,2,1,2,

%T 4,4,3,2,4,2,2,2,4,2,2,6,2,2,2,3,2,4,2,2,4,4,2,2,2,2,4,2,2,6,1,4,8,2,

%U 2,4,4,2,1,2,4,3,6,4,4,2,2,5,4,2,2,4,2,2,2,2,6,4,2,2,2,4,1,2,6,6,3,2,8,2,2

%N a(0)=a(1)=1. For n>=2, a(n) = number of positive divisors of n that are coprime to (a(n-1) + a(n-2)).

%e a(12)+a(13) = 4. There are two divisors of 14 which are coprime to 4. (These divisors are 1 and 7.) So a(14) = 2.

%p with(numtheory): a[0]:=1: a[1]:=1: for n from 2 to 130 do div:=divisors(n): ct:=0: for j from 1 to tau(n) do if igcd(div[j],a[n-1]+a[n-2])=1 then ct:=ct+1 else ct:=ct: fi: od: a[n]:=ct: od: seq(a[n],n=0..130); # _Emeric Deutsch_, Apr 26 2007

%p A128864 := proc(nmax) local a,n,dvs,resl,d ; a := [1,1] ; while nops(a) < nmax do n := nops(a) ; dvs := numtheory[divisors](n) ; resl :=0 ; for d from 1 to nops(dvs) do if gcd(op(d,dvs), op(-1,a)+op(-2,a)) = 1 then resl := resl+1 ; fi ; od ; a := [op(a),resl] ; od ; RETURN(a) ; end: A128864(100) ; # _R. J. Mathar_, Apr 27 2007

%Y Cf. A116204.

%K nonn

%O 0,4

%A _Leroy Quet_, Apr 17 2007

%E More terms from _Emeric Deutsch_ and _R. J. Mathar_, Apr 26 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 July 7 18:02 EDT 2024. Contains 374112 sequences. (Running on oeis4.)