login
Numbers m such that every k <= m is a sum of proper divisors of m (for m>1).
(Formerly M4095)
5

%I M4095 #41 Jul 06 2023 09:05:10

%S 1,6,12,18,20,24,28,30,36,40,42,48,54,56,60,66,72,78,80,84,88,90,96,

%T 100,104,108,112,120,126,132,140,144,150,156,160,162,168,176,180,192,

%U 196,198,200,204,208,210,216,220,224,228,234,240,252,260,264,270,272,276,280,288,294,300,304,306

%N Numbers m such that every k <= m is a sum of proper divisors of m (for m>1).

%C This sequence was formerly called "practical numbers (second definition)" because it was thought this was the definition used in Srinivasan's original paper. However, in Srinivasan's paper, one can read that his definition is "k < m". Stewart proves that Srinivasan's definition is equivalent to requiring every k <= sigma(m) be the sum of distinct divisors of m. This sequence is a subsequence of the practical numbers, A005153. - _T. D. Noe_, Apr 02 2010

%C A005153 without terms larger than 1 that are almost-perfect numbers (numbers k such that sigma(k) = 2*k-1, the only known such numbers are the powers of 2, A000079). - _Amiram Eldar_, Apr 07 2023

%D Ross Honsberger, Mathematical Gems, M.A.A., 1973, p. 113.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A007620/b007620.txt">Table of n, a(n) for n=1..1000</a>

%H A. K. Srinivasan, <a href="https://web.archive.org/web/20200815171531/https://www.currentscience.ac.in/Downloads/article_id_017_06_0179_0180_0.pdf">Practical numbers</a>, Current Science, 17 (1948), 179-180.

%H B. M. Stewart, <a href="http://doi.org/10.2307/2372651">Sums of distinct divisors</a>, American Journal of Mathematics, Vol. 76, No. 4 (1954), pp. 779-785.

%H Robert G. Wilson v, <a href="/A007621/a007621.pdf">Letter to N. J. A. Sloane</a>, date unknown.

%t DeleteCases[ A005835, q_/; (Count[ CoefficientList[ Series[ Times@@( (1+z^#)& /@ Divisors[ q ] ), {z, 0, q} ], z ], 0 ]>0) ] (* _Wouter Meeussen_ *)

%o (Haskell)

%o a007620 n = a007620_list !! (n-1)

%o a007620_list = 1 : filter (\x -> all (p $ a027751_row x) [1..x]) [2..]

%o where p _ 0 = True

%o p [] _ = False

%o p ds'@(d:ds) m = d <= m && (p ds (m - d) || p ds m)

%o -- _Reinhard Zumkeller_, Feb 23 2014

%o (Python)

%o from itertools import count, islice

%o from sympy import divisors

%o def A007620_gen(startvalue=1): # generator of terms >= startvalue

%o for m in count(max(startvalue,1)):

%o if m == 1:

%o yield 1

%o else:

%o c = {0}

%o for d in divisors(m,generator=True):

%o if d < m:

%o c |= {a+d for a in c}

%o if all(a in c for a in range(m+1)):

%o yield m

%o A007620_list = list(islice(A007620_gen(),30)) # _Chai Wah Wu_, Jul 06 2023

%Y Cf. A005153 (first definition).

%Y Cf. A000079, A027751.

%K nonn,nice,easy

%O 1,2

%A _N. J. A. Sloane_, _Robert G. Wilson v_