[seqfan] Re: cototient divisibility in A196736
D. S. McNeil
dsm054 at gmail.com
Fri Oct 14 02:39:29 CEST 2011
> Where is the error?
I don't think there is one. However, I think I can reproduce the
terms in the sequence if I impose the distinctness condition in the
comment that "n - ( Sum_{i=1..j} k(i) ) are all distinct divisors";
note that 6 and 10 both have cototient sets with duplicate 1s.
IOW, this seems to match the terms:
def is_A196736(n):
k = lambda x: sum(1 for m in (1..n) if number_of_divisors(gcd(n,m))==x)
cototient_n = n-euler_phi(n)
z = number_of_divisors(cototient_n) if cototient_n > 0 else 0
v = [(n-sum(k(i) for i in (1..j))) for j in (1..z)]
return len(set(v)) == len(v) and all(vi.divides(cototient_n) for vi in v)
Probably the name should be tweaked.
Doug
More information about the SeqFan
mailing list