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.

A046760 Wasteful numbers.

Original entry on oeis.org

4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 108, 110, 114
Offset: 1

Views

Author

Keywords

Comments

Write n as product of primes raised to powers, let D(n) = number of digits in product, l(n) = number of digits in n; sequence gives n such that D(n)>l(n).
A050252(a(n)) > A055642(a(n)). - Reinhard Zumkeller, Jun 21 2011

Examples

			For n = 125 = 5^3, l(n) = 3 but D(n) = 2. So 125 is not a term of this sequence. [clarified by _Derek Orr_, Jan 30 2015]
		

Crossrefs

Programs

  • Haskell
    a046760 n = a046760_list !! (n-1)
    a046760_list = filter (\n -> a050252 n > a055642 n) [1..]
    -- Reinhard Zumkeller, Aug 02 2013
    
  • Mathematica
    Cases[Range[115], n_ /; Length[Flatten[IntegerDigits[FactorInteger[n] /. 1 -> Sequence[]]]] > Length[IntegerDigits[n]]] (* Jean-François Alcover, Mar 21 2011 *)
  • PARI
    for(n=1,100,s="";F=factor(n);for(i=1,#F[,1],s=concat(s,Str(F[i,1]));s=concat(s,Str(F[i,2])));c=0;for(j=1,#F[,2],if(F[j,2]==1,c++));if(#digits(n)<#s-c,print1(n,", "))) \\ Derek Orr, Jan 30 2015
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A046760_gen(): # generator of terms
        return (n for n in count(1) if len(str(n)) < sum(len(str(p))+(len(str(e)) if e > 1 else 0) for p, e in factorint(n).items()))
    A046760_list = list(islice(A046760_gen(),20)) # Chai Wah Wu, Feb 18 2022