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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

6, 21, 28, 85, 496, 2133, 8128, 19521, 77125, 97273, 176661, 615281, 4948133, 33550336, 68353213, 129127041, 8589869056
Offset: 1

Views

Author

Paolo P. Lava, Aug 29 2014

Keywords

Comments

Similar to Keith numbers and Primonacci numbers, using proper divisors instead of digits or prime factors.
The perfect numbers A000396 are a subset.
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
The 2-hyperperfect numbers A007593 are a subset, with number of iterations 2. - Michel Marcus, Sep 22 2014

Examples

			Aliquot parts of 85 are 1, 5 and 17:
  1 + 5 + 17 = 23;
  5 + 17 + 23 = 45;
  17 + 23 + 45 = 85.
Aliquot parts of 19521 are 1, 3, 9, 27, 81, 241, 723, 2169 and 6507:
  1 + 3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 = 9761;
  3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 + 9761 = 19521.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h)
    local a,b,k,n,t,v; v:=array(1..h);
    for n from 2 to q do if not isprime(n) then
    a:=sort([op(divisors(n))]); b:=nops(a)-1;
    for k from 1 to b do v[k]:=a[k]; od;
    t:=b+1; v[t]:=add(v[k],k=1..b);
    while v[t]
    				
  • Mathematica
    A246544 = {};
    For[n = 4, n <= 1000000, n++,
     If[PrimeQ[n], Continue[]];
     a = Most[Divisors[n]];
     sum = Total[a];
     While[sum < n, sum = Total[a = Join[Rest[a], {sum}]]];
     If[sum == n, AppendTo[A246544, n]];
    ]; A246544 (* Robert Price, Sep 08 2019 *)
  • 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
    
  • Python
    import math
    def divs(n):
        large_divisors = []
        for i in range(1, int(math.sqrt(n) + 1)):
            if n % i == 0:
                yield i
                if i !=  n // i:
                    large_divisors.insert(0, n / i)
        for divisor in large_divisors:
            yield divisor
    a = 2
    while a < 1000000000:
        q = list(divs(a))[:-1]
        r = sum(q)
        if r > a or len(q) == 1:
            pass
        elif r == a:
            print(a)
        else:
            c = 1
            while r < a:
                q.append(r)
                r = sum(q[c:])
                c += 1
            if r == a:
                print(a)
        a += 1
    # David Consiglio, Jr., Sep 09 2014
    
  • Python
    from sympy import divisors, isprime
    A246544_list = []
    for n in range(2,10**5):
        if not isprime(n):
            x = divisors(n)
            x.pop()
            y = sum(x)
            while y < n:
                x, y = x[1:]+[y], 2*y-x[0]
            if y == n:
                A246544_list.append(n)
    # Chai Wah Wu, Nov 03 2014

Extensions

a(13)-a(15) from Michel Marcus, Aug 29 2014
a(16) from David Consiglio, Jr., Sep 06 2014
a(17) from Lars Blomberg, Oct 27 2014

A247013 Consider the prime factors, with multiplicity, in ascending order, of a composite number not ending in 0. 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 the reverse of themselves.

Original entry on oeis.org

4, 9, 14, 94, 194, 371, 1887, 1994, 11282, 25656, 61081, 66691, 112082, 394407, 582225, 4284191, 5681778, 9317913, 9361072, 9493615, 19120874, 75519134, 92688481
Offset: 1

Views

Author

Paolo P. Lava, Sep 09 2014

Keywords

Comments

Similar to A212875 but reading the sum backwards.
If numbers ending in 0 are allowed, 1200 has factors 2,2,2,2,3,5,5 which add up to 21. - Chai Wah Wu, Sep 12 2014

Examples

			Prime factors of 1994 are 2 and 997;
2 + 997 = 999;
997 + 999 = 1996;
999 + 1996 = 2995;
1996 + 2995 = 4991 that is the reverse of 1994.
Prime factors of 25656 are 2^3, 3 and 1069;
2 + 2 + 2 + 3 + 1069 = 1078;
2 + 2 + 3 + 1069 + 1078 = 2154;
2 + 3 + 1069 + 1078 + 2154 = 4306;
3 + 1069 + 1078 + 2154 + 4306 = 8610;
1069 + 1078 + 2154 + 4306 + 8610 = 17217;
1078 + 2154 + 4306 + 8610 + 17217 = 33365;
2154 + 4306 + 8610 + 17217 + 33365 = 65652 that is the reverse of 25656.
		

Crossrefs

Programs

  • Maple
    with(numtheory): R:=proc(w) local x,y; x:=w; y:=0;
    while x>0 do y:=10*y+(x mod 10); x:=trunc(x/10); od: y; end:
    P:=proc(q,h) local a,b,c,d,j,k,n,t,v; v:=array(1..h);
    for n from 2 to q do if not isprime(n) then a:=ifactors(n)[2];
    b:=nops(a); c:=ilog10(n)+1; t:=0; d:=[];
    for k from 1 to b do for j from 1 to a[k,2] do d:=[op(d),a[k,1]]; od;
    od; d:=sort(d); for k from 1 to nops(d) do v[k]:=d[k]; od; a:=nops(d);
    t:=a; t:=t+1; v[t]:=add(v[k],k=1..t-1); if R(v[t])=n then print(n);
    else while ilog10(v[t])+1<=c do t:=t+1; v[t]:=add(v[k],k=t-a..t-1);
    if R(v[t])=n then print(n); break; fi; od; fi; fi; od; end:
    P(10^6, 1000);
  • Mathematica
    A247013 = {};
    For[n = 4, n <= 1000000, n++,
     If[Mod[n, 10] == 0 || PrimeQ[n], Continue[]];
     r = IntegerReverse[n];
     a = Flatten[Map[Table[#[[1]], {#[[2]]}] &, FactorInteger[n]]];
     sum = Total[a];
     While[sum < r, sum = Total[a = Join[Rest[a], {sum}]]];
     If[sum == r, AppendTo[A247013, n]];
    ]; A247013 (* Robert Price, Sep 08 2019 *)
  • Python
    from itertools import chain
    from sympy import isprime, factorint
    A247013_list = []
    for n in range(2,10**8):
        m = int(str(n)[::-1])
        if n % 10 and not isprime(n):
            x = sorted(chain.from_iterable([p]*e for p,e in factorint(n).items()))
            y = sum(x)
            while y < m:
                x, y = x[1:]+[y], 2*y-x[0]
            if y == m:
                A247013_list.append(n) # Chai Wah Wu, Sep 12 2014

Extensions

More terms and definition edited by Chai Wah Wu, Sep 12 2014
Showing 1-2 of 2 results.