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.

A048124 Becomes prime or 4 after exactly 2 iterations of f(x) = sum of prime factors of x.

This page as a plain text file.
%I A048124 #14 Sep 16 2019 12:17:24
%S A048124 8,9,21,25,30,32,35,36,42,50,57,60,64,72,81,85,86,93,102,111,115,121,
%T A048124 122,138,145,146,159,164,174,182,187,194,215,219,235,236,237,253,258,
%U A048124 260,265,266,282,284,287,289,302,303,308,312,318,319,326,329,338,346
%N A048124 Becomes prime or 4 after exactly 2 iterations of f(x) = sum of prime factors of x.
%C A048124 f(x) = sum of prime factors with multiplicity, so that f(1500) = 2+2+3+5+5+5 = 22.
%C A048124 Numbers k such that A002217(k) = 3. - _Andrew Howroyd_, Sep 15 2019
%H A048124 Andrew Howroyd, <a href="/A048124/b048124.txt">Table of n, a(n) for n = 1..10000</a>
%t A048124 okQ[n_]:=Module[{lst=NestList[Total[Times@@@FactorInteger[#]]&,n,2]}, !PrimeQ[First[lst]] &&!PrimeQ[lst[[2]]]&&First[lst]!=4&&lst[[2]]!=4&&(PrimeQ[Last[lst]]||Last[lst]==4)]; Select[Range[400], okQ] (* _Harvey P. Dale_, Mar 23 2011 *)
%o A048124 (PARI) sopfr(n)={my(f=factor(n)); sum(i=1, #f~, f[i,1]*f[i,2])}
%o A048124 ok(n)={forstep(k=2, 1, -1, n=sopfr(n); if(n==4||isprime(n), return(k==1))); 0}
%o A048124 select(ok, [1..500]) \\ _Andrew Howroyd_, Sep 14 2019
%Y A048124 Cf. A002217, A048125, A048126, A048127, A048128, A048129, A048130, A048131, A048132.
%K A048124 nonn
%O A048124 1,1
%A A048124 _David W. Wilson_