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.

A212921 Composite number n = Product(p_j^k_j) that under the iteration of the map Product (p_j^k_j) -> Sum (p_j * k_j) reaches a limit that divides the number itself.

This page as a plain text file.
%I A212921 #11 Jun 01 2012 12:02:28
%S A212921 4,15,20,21,35,42,55,65,70,95,100,105,110,120,125,130,135,140,150,160,
%T A212921 161,170,180,182,187,190,200,203,217,220,225,231,240,260,270,280,285,
%U A212921 301,305,312,315,319,322,340,343,351,365,370,371,375,395,400,406,407
%N A212921 Composite number n = Product(p_j^k_j) that under the iteration of the map Product (p_j^k_j) ->  Sum (p_j * k_j) reaches a limit that divides the number itself.
%C A212921 Apart from the case n=4, the limit of the iteration is a prime number.
%H A212921 Paolo P. Lava, <a href="/A212921/b212921.txt">Table of n, a(n) for n = 1..10000</a>
%e A212921 70 = 2*5*7 -> 2+5+7 = 14 =2*7 -> 2+7=9 = 3^2 -> 3*2=6=2*3 -> 2+3=5 and 70/5=14.
%p A212921 with(numtheory);
%p A212921 A212921:=proc(q)
%p A212921 local a,b,c,d,i,k,n;
%p A212921 print(4);
%p A212921 for n from 5 to q do
%p A212921   if not isprime(n) then a:=n;
%p A212921     while not isprime(a) do
%p A212921     b:=ifactors(a)[2]; c:=nops(b); b:=op(b); d:=0;
%p A212921     if c=1 then d:=b[1]*b[2];
%p A212921     else for k from 1 to c do d:=d+b[k][1]*b[k][2]; od; fi;
%p A212921     a:=d; if isprime(d) then if trunc(n/d)=n/d then lprint(n,d); fi; break; fi; od;
%p A212921   fi;
%p A212921 od;
%p A212921 end:
%p A212921 A212921(10000);
%t A212921 it[n_] := it[n] = Module[{p, e}, {p, e} = Transpose[FactorInteger[n]]; Dot[p, e]]; it2[n_] := FixedPointList[it[#] &, n]; Select[Range[2, 1000], ! PrimeQ[#] && Mod[#, it2[#][[-1]]] == 0 &] (* _T. D. Noe_, Jun 01 2012 *)
%Y A212921 Cf. A029909.
%K A212921 nonn
%O A212921 1,1
%A A212921 _Paolo P. Lava_, May 31 2012