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.

Original entry on oeis.org

8, 9, 21, 25, 30, 32, 35, 36, 42, 50, 57, 60, 64, 72, 81, 85, 86, 93, 102, 111, 115, 121, 122, 138, 145, 146, 159, 164, 174, 182, 187, 194, 215, 219, 235, 236, 237, 253, 258, 260, 265, 266, 282, 284, 287, 289, 302, 303, 308, 312, 318, 319, 326, 329, 338, 346
Offset: 1

Views

Author

Keywords

Comments

f(x) = sum of prime factors with multiplicity, so that f(1500) = 2+2+3+5+5+5 = 22.
Numbers k such that A002217(k) = 3. - Andrew Howroyd, Sep 15 2019

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    sopfr(n)={my(f=factor(n)); sum(i=1, #f~, f[i,1]*f[i,2])}
    ok(n)={forstep(k=2, 1, -1, n=sopfr(n); if(n==4||isprime(n), return(k==1))); 0}
    select(ok, [1..500]) \\ Andrew Howroyd, Sep 14 2019