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.

A269131 Composite numbers whose largest prime factor is less than its second-largest prime factor's square, counting with multiplicity so that the factors of 18 are 2, 3, 3.

Original entry on oeis.org

4, 6, 8, 9, 12, 15, 16, 18, 21, 24, 25, 27, 30, 32, 35, 36, 42, 45, 48, 49, 50, 54, 55, 60, 63, 64, 65, 70, 72, 75, 77, 81, 84, 85, 90, 91, 95, 96, 98, 100, 105, 108, 110, 115, 119, 120, 121, 125, 126, 128, 130, 133, 135, 140, 143, 144, 147, 150, 154, 161, 162, 165
Offset: 1

Views

Author

Marc Moskowitz, Feb 19 2016

Keywords

Comments

These are numbers that a naïve factoring algorithm can declare done at the penultimate prime factor.

Crossrefs

Cf. A002808, A251728 (semiprime terms).
Subsequence of A253567.

Programs

  • Mathematica
    cnQ[n_]:=Module[{pfs=Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]}, CompositeQ[ n]&&Last[pfs]Harvey P. Dale, Nov 05 2017 *)
  • PARI
    is(n)=my(f=factor(n),e=#f~); e && (f[e,2]>1 || (e>1 && f[e-1,1]^2>f[e,1])) \\ Charles R Greathouse IV, Feb 19 2016
    
  • Python
    seq = []
    for n in range(2, 1000):
        temp = n
        factor = 2
        while temp > 1:
            if temp % factor == 0:
                temp //= factor
                if temp == 1:
                    continue
                if temp < factor * factor:
                    seq.append(n)
            else:
                factor += 1
    print(seq)