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!)
A085599 Number of pairs of coprimes (n-i,n+i), 1<i<n. 1

%I #11 Jul 21 2016 19:03:46

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

%T 15,10,15,12,11,18,17,12,15,20,11,21,19,12,21,23,15,21,19,16,23,26,17,

%U 20,23,18,27,29,15,30,29,18,31,24,19,33,31,22,23,35,23,36,35,20

%N Number of pairs of coprimes (n-i,n+i), 1<i<n.

%F For n>1, a(n) = A055034(n) - ((-1)^n + 1)/2 = A000010(2*n)/2 - ((-1)^n + 1)/2. - _Max Alekseyev_, Jul 21 2016

%e n=7: (7-2,7+2)=(5,9), (7-3,7+3)=(4,10), (7-4,7+4)=(3,11), (7-5,7+5)=(2,12), (7-6,7+6)=(1,13): only three are coprime: (5,9), (3,11) and (1,13), therefore a(7)=3.

%p A085599 := proc(n)

%p local i,a;

%p a := 0 ;

%p for i from 2 to n-1 do

%p if igcd(n-i,n+i) = 1 then

%p a := a+1 ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Jul 09 2016

%Y Cf. A055034, A102781.

%K nonn

%O 1,5

%A _Reinhard Zumkeller_, Jul 06 2003

%E Definition corrected by _Ray Chandler_, Jul 09 2016

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)