

A085599


Number of pairs of coprimes (ni,n+i), 1<i<n.


1



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, 15, 10, 15, 12, 11, 18, 17, 12, 15, 20, 11, 21, 19, 12, 21, 23, 15, 21, 19, 16, 23, 26, 17, 20, 23, 18, 27, 29, 15, 30, 29, 18, 31, 24, 19, 33, 31, 22, 23, 35, 23, 36, 35, 20
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


LINKS

Table of n, a(n) for n=1..75.


FORMULA

For n>1, a(n) = A055034(n)  ((1)^n + 1)/2 = A000010(2*n)/2  ((1)^n + 1)/2.  Max Alekseyev, Jul 21 2016


EXAMPLE

n=7: (72,7+2)=(5,9), (73,7+3)=(4,10), (74,7+4)=(3,11), (75,7+5)=(2,12), (76,7+6)=(1,13): only three are coprime: (5,9), (3,11) and (1,13), therefore a(7)=3.


MAPLE

A085599 := proc(n)
local i, a;
a := 0 ;
for i from 2 to n1 do
if igcd(ni, n+i) = 1 then
a := a+1 ;
end if;
end do:
a ;
end proc: # R. J. Mathar, Jul 09 2016


CROSSREFS

Cf. A055034, A102781.
Sequence in context: A038565 A248605 A239619 * A299966 A302395 A110425
Adjacent sequences: A085596 A085597 A085598 * A085600 A085601 A085602


KEYWORD

nonn


AUTHOR

Reinhard Zumkeller, Jul 06 2003


EXTENSIONS

Definition corrected by Ray Chandler, Jul 09 2016


STATUS

approved



