cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085599 Number of pairs of coprimes (n-i,n+i), 1

This page as a plain text file.
%I A085599 #11 Jul 21 2016 19:03:46
%S A085599 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 A085599 15,10,15,12,11,18,17,12,15,20,11,21,19,12,21,23,15,21,19,16,23,26,17,
%U A085599 20,23,18,27,29,15,30,29,18,31,24,19,33,31,22,23,35,23,36,35,20
%N A085599 Number of pairs of coprimes (n-i,n+i), 1<i<n.
%F A085599 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 A085599 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 A085599 := proc(n)
%p A085599     local i,a;
%p A085599     a := 0 ;
%p A085599     for i from 2 to n-1 do
%p A085599         if igcd(n-i,n+i) = 1 then
%p A085599             a := a+1 ;
%p A085599         end if;
%p A085599     end do:
%p A085599     a ;
%p A085599 end proc: # _R. J. Mathar_, Jul 09 2016
%Y A085599 Cf. A055034, A102781.
%K A085599 nonn
%O A085599 1,5
%A A085599 _Reinhard Zumkeller_, Jul 06 2003
%E A085599 Definition corrected by _Ray Chandler_, Jul 09 2016