login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Composite numbers k such that the difference between the odd and even aliquot parts of k divides k.
1

%I #9 Jun 16 2018 16:06:42

%S 4,6,20,30,60,270,630,728,1170,1638,1890,2310,2730,2970,4590,8190,

%T 8910,12870,14850,16830,17850,18018,18810,19110,19890,22230,27846,

%U 27930,33930,52290,56070,60512,61110,63630,64890,67410,68670,80730,86130

%N Composite numbers k such that the difference between the odd and even aliquot parts of k divides k.

%H Harry J. Smith, <a href="/A066193/b066193.txt">Table of n, a(n) for n = 1..290</a>

%t Do[ d = Drop[ Divisors[ n ], -1 ]; l = Length[ d ]; ev = 0; od = 1; k = 2; While[ k <= l, If[ EvenQ[ d[ [ k ] ] ], ev = ev + d[ [ k ] ], od = od + d[ [ k ] ] ]; k++ ]; If[ !PrimeQ[ n ] && IntegerQ[ n/ Abs[ ev - od ] ], Print[ n ] ], {n, 2, 10^5} ]

%o (PARI) { n=0; for (m=4, 10^9, if (isprime(m), next); d=divisors(m); s=1; for (i=2, numdiv(m) - 1, if (d[i]%2, s += d[i], s -= d[i])); if (s != 0 && m%s == 0, write("b066193.txt", n++, " ", m); if (n==1000, return)) ) } \\ _Harry J. Smith_, Feb 05 2010

%K nonn

%O 1,1

%A _Robert G. Wilson v_, Dec 15 2001