OFFSET
0,7
COMMENTS
a(p) = 0 if p is prime.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
FORMULA
a(0) = 0; and for n >= 1, a(n) = floor((n-phi(n))/2), where phi(n)=A000010(n) is Euler's totient function. - Dean Hickerson, Apr 22 2003. Clarified by Antti Karttunen, Oct 30 2017
EXAMPLE
a(14) = 4 and the partitions are (12,2), (10,4), (8,6) and (7,7).
a(13) = 0 as for all r + s = 13, r > 0, s > 0, gcd(r,s) = 1.
MATHEMATICA
Array[Floor[(# - EulerPhi[#])/2] &, 87, 0] (* or *)
Table[-1 + Boole[n == 1] + Count[IntegerPartitions[n, 2], _?(! CoprimeQ @@ # &)], {n, 0, 86}] (* Michael De Vlieger, Oct 30 2017 *)
PROG
(PARI) A082023(n) = if(0==n, n, ((n-eulerphi(n))\2)); \\ Antti Karttunen, Oct 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 07 2003
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
STATUS
approved