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.

A176297 Numbers with at least one 3 in their prime signature.

Original entry on oeis.org

8, 24, 27, 40, 54, 56, 72, 88, 104, 108, 120, 125, 135, 136, 152, 168, 184, 189, 200, 216, 232, 248, 250, 264, 270, 280, 296, 297, 312, 328, 343, 344, 351, 360, 375, 376, 378, 392, 408, 424, 432, 440, 456, 459, 472, 488, 500, 504, 513, 520, 536, 540, 552, 568, 584, 594, 600, 616, 621, 632, 648, 664, 675, 680, 686, 696, 702, 712
Offset: 1

Views

Author

Keywords

Comments

That is, if n = p1^e1 p2^e2 ... pr^er for distinct primes p1, p2,..., pr, then one of the exponents must be 3 for n to be in this sequence.
The asymptotic density of this sequence is 1 - Product_{p prime} (1 - 1/p^3 + 1/p^4) = 0.0952910730... - Amiram Eldar, Nov 14 2020

Examples

			8=2^3, 24=2^3*3, 27=3^3, 40=2^3*5, ...
		

Crossrefs

Programs

  • Maple
    filter:= proc(x) local F; F:= map(t->t[2],ifactors(x)[2]);has(F,3) end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 11 2015
    # alternative:
    isA176297 := proc(n)
        local p;
        for p in ifactors(n)[2] do
            if op(2,p) = 3 then
                return true;
            end if;
        end do:
        false ;
    end proc: # R. J. Mathar, Dec 08 2015
  • Mathematica
    f[n_]:=MemberQ[Last/@FactorInteger[n],3]; Select[Range[6!],f]
  • PARI
    isok(n) = vecsearch(vecsort(factor(n)[,2]), 3); \\ Michel Marcus, Jan 11 2015
    
  • Python
    from sympy import factorint
    def ok(n): return 3 in [e for e in factorint(n).values()]
    print(list(filter(ok, range(713)))) # Michael S. Branicky, Aug 24 2021