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.

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.

This page as a plain text file.
%I A247013 #21 May 22 2025 10:21:40
%S A247013 4,9,14,94,194,371,1887,1994,11282,25656,61081,66691,112082,394407,
%T A247013 582225,4284191,5681778,9317913,9361072,9493615,19120874,75519134,
%U A247013 92688481
%N 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.
%C A247013 Similar to A212875 but reading the sum backwards.
%C A247013 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
%e A247013 Prime factors of 1994 are 2 and 997;
%e A247013 2 + 997 = 999;
%e A247013 997 + 999 = 1996;
%e A247013 999 + 1996 = 2995;
%e A247013 1996 + 2995 = 4991 that is the reverse of 1994.
%e A247013 Prime factors of 25656 are 2^3, 3 and 1069;
%e A247013 2 + 2 + 2 + 3 + 1069 = 1078;
%e A247013 2 + 2 + 3 + 1069 + 1078 = 2154;
%e A247013 2 + 3 + 1069 + 1078 + 2154 = 4306;
%e A247013 3 + 1069 + 1078 + 2154 + 4306 = 8610;
%e A247013 1069 + 1078 + 2154 + 4306 + 8610 = 17217;
%e A247013 1078 + 2154 + 4306 + 8610 + 17217 = 33365;
%e A247013 2154 + 4306 + 8610 + 17217 + 33365 = 65652 that is the reverse of 25656.
%p A247013 with(numtheory): R:=proc(w) local x,y; x:=w; y:=0;
%p A247013 while x>0 do y:=10*y+(x mod 10); x:=trunc(x/10); od: y; end:
%p A247013 P:=proc(q,h) local a,b,c,d,j,k,n,t,v; v:=array(1..h);
%p A247013 for n from 2 to q do if not isprime(n) then a:=ifactors(n)[2];
%p A247013 b:=nops(a); c:=ilog10(n)+1; t:=0; d:=[];
%p A247013 for k from 1 to b do for j from 1 to a[k,2] do d:=[op(d),a[k,1]]; od;
%p A247013 od; d:=sort(d); for k from 1 to nops(d) do v[k]:=d[k]; od; a:=nops(d);
%p A247013 t:=a; t:=t+1; v[t]:=add(v[k],k=1..t-1); if R(v[t])=n then print(n);
%p A247013 else while ilog10(v[t])+1<=c do t:=t+1; v[t]:=add(v[k],k=t-a..t-1);
%p A247013 if R(v[t])=n then print(n); break; fi; od; fi; fi; od; end:
%p A247013 P(10^6, 1000);
%t A247013 A247013 = {};
%t A247013 For[n = 4, n <= 1000000, n++,
%t A247013  If[Mod[n, 10] == 0 || PrimeQ[n], Continue[]];
%t A247013  r = IntegerReverse[n];
%t A247013  a = Flatten[Map[Table[#[[1]], {#[[2]]}] &, FactorInteger[n]]];
%t A247013  sum = Total[a];
%t A247013  While[sum < r, sum = Total[a = Join[Rest[a], {sum}]]];
%t A247013  If[sum == r, AppendTo[A247013, n]];
%t A247013 ]; A247013 (* _Robert Price_, Sep 08 2019 *)
%o A247013 (Python)
%o A247013 from itertools import chain
%o A247013 from sympy import isprime, factorint
%o A247013 A247013_list = []
%o A247013 for n in range(2,10**8):
%o A247013     m = int(str(n)[::-1])
%o A247013     if n % 10 and not isprime(n):
%o A247013         x = sorted(chain.from_iterable([p]*e for p,e in factorint(n).items()))
%o A247013         y = sum(x)
%o A247013         while y < m:
%o A247013             x, y = x[1:]+[y], 2*y-x[0]
%o A247013         if y == m:
%o A247013             A247013_list.append(n) # _Chai Wah Wu_, Sep 12 2014
%Y A247013 Cf A097090, A212875, A247012.
%K A247013 nonn,more,base
%O A247013 1,1
%A A247013 _Paolo P. Lava_, Sep 09 2014
%E A247013 More terms and definition edited by _Chai Wah Wu_, Sep 12 2014