cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A246544 Consider the aliquot parts, in ascending order, of a composite number. Take their sum and repeat the process deleting the minimum number and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.

This page as a plain text file.
%I A246544 #51 May 14 2025 01:10:37
%S A246544 6,21,28,85,496,2133,8128,19521,77125,97273,176661,615281,4948133,
%T A246544 33550336,68353213,129127041,8589869056
%N A246544 Consider the aliquot parts, in ascending order, of a composite number. Take their sum and repeat the process deleting the minimum number and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.
%C A246544 Similar to Keith numbers and Primonacci numbers, using proper divisors instead of digits or prime factors.
%C A246544 The perfect numbers A000396 are a subset.
%C A246544 The numbers of iterations are: 1, 2, 1, 3, 1, 2, 1, 2, 3, 4, 2, 5, ...; with 1 when the term is perfect. - _Michel Marcus_, Aug 30 2014
%C A246544 The 2-hyperperfect numbers A007593 are a subset, with number of iterations 2. - _Michel Marcus_, Sep 22 2014
%e A246544 Aliquot parts of 85 are 1, 5 and 17:
%e A246544   1 + 5 + 17 = 23;
%e A246544   5 + 17 + 23 = 45;
%e A246544   17 + 23 + 45 = 85.
%e A246544 Aliquot parts of 19521 are 1, 3, 9, 27, 81, 241, 723, 2169 and 6507:
%e A246544   1 + 3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 = 9761;
%e A246544   3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 + 9761 = 19521.
%p A246544 with(numtheory): P:=proc(q,h)
%p A246544 local a,b,k,n,t,v; v:=array(1..h);
%p A246544 for n from 2 to q do if not isprime(n) then
%p A246544 a:=sort([op(divisors(n))]); b:=nops(a)-1;
%p A246544 for k from 1 to b do v[k]:=a[k]; od;
%p A246544 t:=b+1; v[t]:=add(v[k],k=1..b);
%p A246544 while v[t]<n do t:=t+1; v[t]:=add(v[k],k=t-b..t-1); od;
%p A246544 if v[t]=n then print(n); fi; fi; od; end: P(10^9,1000);
%t A246544 A246544 = {};
%t A246544 For[n = 4, n <= 1000000, n++,
%t A246544  If[PrimeQ[n], Continue[]];
%t A246544  a = Most[Divisors[n]];
%t A246544  sum = Total[a];
%t A246544  While[sum < n, sum = Total[a = Join[Rest[a], {sum}]]];
%t A246544  If[sum == n, AppendTo[A246544, n]];
%t A246544 ]; A246544 (* _Robert Price_, Sep 08 2019 *)
%o A246544 (PARI) lista(nn) = {forcomposite(n=1, nn, d = divisors(n); v = vector(#d-1, i, d[i]); vs = sum(i=1, #v, v[i]); ind = 1; while (vs < n, v = concat(v, vs); vs += vs - v[ind]; ind++;); if (vs == n, print1(n, ", ")););} \\ _Michel Marcus_, Aug 29 2014
%o A246544 (Python)
%o A246544 import math
%o A246544 def divs(n):
%o A246544     large_divisors = []
%o A246544     for i in range(1, int(math.sqrt(n) + 1)):
%o A246544         if n % i == 0:
%o A246544             yield i
%o A246544             if i !=  n // i:
%o A246544                 large_divisors.insert(0, n / i)
%o A246544     for divisor in large_divisors:
%o A246544         yield divisor
%o A246544 a = 2
%o A246544 while a < 1000000000:
%o A246544     q = list(divs(a))[:-1]
%o A246544     r = sum(q)
%o A246544     if r > a or len(q) == 1:
%o A246544         pass
%o A246544     elif r == a:
%o A246544         print(a)
%o A246544     else:
%o A246544         c = 1
%o A246544         while r < a:
%o A246544             q.append(r)
%o A246544             r = sum(q[c:])
%o A246544             c += 1
%o A246544         if r == a:
%o A246544             print(a)
%o A246544     a += 1
%o A246544 # _David Consiglio, Jr._, Sep 09 2014
%o A246544 (Python)
%o A246544 from sympy import divisors, isprime
%o A246544 A246544_list = []
%o A246544 for n in range(2,10**5):
%o A246544     if not isprime(n):
%o A246544         x = divisors(n)
%o A246544         x.pop()
%o A246544         y = sum(x)
%o A246544         while y < n:
%o A246544             x, y = x[1:]+[y], 2*y-x[0]
%o A246544         if y == n:
%o A246544             A246544_list.append(n)
%o A246544 # _Chai Wah Wu_, Nov 03 2014
%Y A246544 Cf. A000396, A007629, A212875.
%K A246544 nonn,more
%O A246544 1,1
%A A246544 _Paolo P. Lava_, Aug 29 2014
%E A246544 a(13)-a(15) from _Michel Marcus_, Aug 29 2014
%E A246544 a(16) from _David Consiglio, Jr._, Sep 06 2014
%E A246544 a(17) from _Lars Blomberg_, Oct 27 2014