A295265 Numbers m such that sum of its i first divisors equals the sum of its j first non-divisors for some i, j.
4, 8, 10, 13, 14, 16, 19, 20, 21, 22, 26, 28, 30, 32, 34, 38, 39, 40, 43, 44, 46, 50, 52, 53, 56, 58, 60, 62, 63, 64, 68, 70, 72, 74, 76, 80, 82, 86, 88, 89, 90, 92, 94, 98, 99, 100, 103, 104, 106, 110, 111, 112, 116, 117, 118, 122, 124, 128, 130, 132, 134, 135
Offset: 1
Keywords
Examples
30 is in the sequence because d(1) + d(2) + d(3) + d(4) = 1 + 2 + 3 + 5 = 11 and nd(1) + nd(2) = 4 + 7 = 11.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory):nn:=300: for n from 1 to nn do: d:=divisors(n):n0:=nops(d):lst:={}:ii:=0: for i from 1 to n do: lst:=lst union {i}: od: lst:=lst minus d:n1:=nops(lst): for m from 1 to n0 while(ii=0) do: s1:=sum(‘d[i]’, ‘i’=1..m): for j from 1 to n1 while(ii=0) do: s2:=sum(‘lst[i]’, ‘i’=1..j): if s1=s2 then ii:=1:printf(`%d, `,n): else fi: od: od: od:
-
Mathematica
fQ[n_] := Block[{d = Divisors@ n}, nd = nd = Complement[Range@ n, d]; Intersection[Accumulate@ d, Accumulate@ nd] != {}]; Select[ Range@135, fQ] (* Robert G. Wilson v, Mar 06 2018 *)
-
PARI
isok(n) = {d = divisors(n); psd = vector(#d, k, sum(j=1, k, d[j])); nd = setminus([1..n], d); psnd = vector(#nd, k, sum(j=1, k, nd[j])); #setintersect(psd, psnd) != 0;} \\ Michel Marcus, May 05 2018
Comments