A290582 Numbers m > 2 such that every divisor > 2 is the sum of two or more consecutive divisors.
6, 18, 54, 66, 162, 486, 726, 1458, 4374, 7986, 13122, 39366, 87846, 118098, 354294, 530226, 966306, 1062882, 3188646, 9565938, 10629366, 28697814, 43035786, 86093442, 116923026, 258280326, 578476566, 774840978, 1286153286, 2324522934, 6973568802, 14147686146
Offset: 1
Keywords
Examples
66 is in the sequence because the divisors are {1, 2, 3, 6, 11, 22, 33, 66} and: 3 = 2 + 1; 6 = 3 + 2 + 1; 11 = 6 + 3 + 2; 22 = 11 + 6 + 3 + 2; 33 = 22 + 11; 66 = 33 + 22 + 11.
Programs
-
Maple
with(numtheory):nn:=10^5: for n from 4 to nn do: d:=divisors(n):n1:=nops(d):it:=0: for k from 3 to n1 do: for j from 1 to k-1 do: s:=sum('d[k-i]', 'i'=1..j): if s=d[k] then it:=it+1: else fi: od: od: if n1>2 and it = n1-2 then printf(`%d, `,n): else fi: od:
-
Mathematica
Select[Range[3, 10^5], Function[d, Function[t, AllTrue[ TakeWhile[ Reverse@ d, # > 2 &], MemberQ[t, #] &]]@ Union@ Flatten@ Array[Total /@ Partition[d, #, 1] &, Length@ d - 1, 2]]@ Divisors@ # &] (* Michael De Vlieger, Aug 07 2017 *)
-
PARI
isokds(k, v) = {vsmall = select(x->(x < k), v); for (i=1, #vsmall, s = v[i]; if (s > k, break); for (j=i+1, #vsmall, s += vsmall[j]; if (s > k, break, if (k == s, return(1))););); return (0);} isok(n) = {if (n>2, my(d = divisors(n)); for (i=1, #d, if (d[i] > 2, if (! isokds(d[i], d), return (0)); ); ); return(1);)} \\ Michel Marcus, Aug 07 2017
Extensions
Name corrected by Jon E. Schoenfield, Sep 11 2017
Comments