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.

A046759 Economical numbers: write n as a 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).

Original entry on oeis.org

125, 128, 243, 256, 343, 512, 625, 729, 1024, 1029, 1215, 1250, 1280, 1331, 1369, 1458, 1536, 1681, 1701, 1715, 1792, 1849, 1875, 2048, 2187, 2197, 2209, 2401, 2560, 2809, 3125, 3481, 3584, 3645, 3721, 4096, 4374, 4375, 4489, 4802, 4913
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

A050252(a(n)) < A055642(a(n)). - Reinhard Zumkeller, Jun 21 2011

Examples

			125 = 5^3, l(n) = 3 and D(n) = 2, so 125 is a member of the sequence.
		

References

  • Bernardo Recamán, The Bogota Puzzles, Courier Dover Publications, Inc., 2020, p. 77.

Crossrefs

Programs

  • Haskell
    a046759 n = a046759_list !! (n-1)
    a046759_list = filter (\n -> a050252 n < a055642 n) [1..]
    -- Reinhard Zumkeller, Jun 21 2011
    
  • Mathematica
    ecoQ[n_] := Total[ Length /@ IntegerDigits /@ Flatten[ FactorInteger[n] /. {p_, 1} -> p]] < Length[ IntegerDigits[n]]; Select[ Range[5000], ecoQ] (* Jean-François Alcover, Jul 28 2011 *)
  • PARI
    is(n)=my(f=factor(n));sum(i=1,#f[,1], #Str(f[i,1])+if(f[i,2]>1, #Str(f[i,2])))<#Str(n) && n>1 \\ Charles R Greathouse IV, Feb 01 2013
    
  • Python
    from sympy import factorint
    def ok(n): return n > 1 and sum(len(str(p))+(len(str(e)) if e>1 else 0) for p, e in factorint(n).items()) < len(str(n))
    print([k for k in range(5000) if ok(k)]) # Michael S. Branicky, Dec 22 2024

Extensions

More terms from Eric W. Weisstein