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.

Showing 1-9 of 9 results.

A379373 Numbers k such that A050252(k) <= A055642(k).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 11, 13, 14, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 35, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 105, 106, 107, 109, 111, 112, 113, 115, 118, 119, 121, 122, 123, 125, 127, 128, 129, 131, 133, 134, 135
Offset: 1

Views

Author

Paolo Xausa, Dec 21 2024

Keywords

Comments

Some authors call these numbers "economical numbers" (see links) and refer to A046759 as "frugal numbers", while other authors define "economical numbers" to be A046759.
First differs from A046758 at n = 54, where a(54) = 125 is missing from A046758.

Examples

			112 is a term because 112 = (2^4)*7; the total number of digits of (2, 4, 7) = 1 + 1 + 1 <= the number of digits of 112 (3).
125 is a term because 125 = 5^3; the total number of digits of (5, 3) = 1 + 1 <= the number of digits of 125 (3).
		

Crossrefs

Union of A046758 and A046759.
Complement of A046760.

Programs

  • Mathematica
    A379373Q[k_] := Total[IntegerLength[Select[Flatten[FactorInteger[k]], # > 1 &]]] <= IntegerLength[k];
    Select[Range[200], A379373Q]
  • Python
    from sympy import factorint
    def ok(n): return n > 0 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(136) if ok(k)]) # Michael S. Branicky, Dec 22 2024

A055642 Number of digits in the decimal expansion of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Henry Bottomley, Jun 06 2000

Keywords

Comments

From Hieronymus Fischer, Jun 08 2012: (Start)
For n > 0 the first differences of A117804.
The total number of digits necessary to write down all the numbers 0, 1, 2, ..., n is A117804(n+1). (End)
Here a(0) = 1, but a different common convention is to consider that the expansion of 0 in any base b > 0 has 0 terms and digits. - M. F. Hasler, Dec 07 2018

Examples

			Examples:
999: 1 + floor(log_10(999)) = 1 + floor(2.x) = 1 + 2 = 3 or
      ceiling(log_10(999+1)) = ceiling(log_10(1000)) = ceiling(3) = 3;
1000: 1 + floor(log_10(1000)) = 1 + floor(3) = 1 + 3 = 4 or
      ceiling(log_10(1000+1)) = ceiling(log_10(1001)) = ceiling(3.x) = 4;
1001: 1 + floor(log_10(1001)) = 1 + floor(3.x) = 1 + 3 = 4 or
      ceiling(log_10(1001+1)) = ceiling(log_10(1002)) = ceiling(3.x) = 4;
		

Crossrefs

Programs

  • Haskell
    a055642 :: Integer -> Int
    a055642 = length . show  -- Reinhard Zumkeller, Feb 19 2012, Apr 26 2011
    
  • Magma
    [ #Intseq(n): n in [0..105] ];   //  Bruno Berselli, Jun 30 2011
    (Common Lisp) (defun A055642 (n) (if (zerop n) 1 (floor (log n 10)))) ; James Spahlinger, Oct 13 2012
    
  • Maple
    A055642 := proc(n)
            max(1,ilog10(n)+1) ;
    end proc:  # R. J. Mathar, Nov 30 2011
  • Mathematica
    Join[{1}, Array[ Floor[ Log[10, 10# ]] &, 104]] (* Robert G. Wilson v, Jan 04 2006 *)
    Join[{1},Table[IntegerLength[n],{n,104}]]
    IntegerLength[Range[0,120]] (* Harvey P. Dale, Jul 02 2016 *)
  • PARI
    a(n)=#Str(n) \\ M. F. Hasler, Nov 17 2008
    
  • PARI
    A055642(n)=logint(n+!n,10)+1 \\ Increasingly faster than the above, for larger n. (About twice as fast for n ~ 10^7.) - M. F. Hasler, Dec 07 2018
    
  • Python
    def a(n): return len(str(n))
    print([a(n) for n in range(121)]) # Michael S. Branicky, May 10 2022
    
  • Python
    def A055642(n): # Faster than len(str(n)) from ~ 50 digits on
        L = math.log10(n or 1)
        if L.is_integer() and 10**int(L)>n: return int(L or 1)
        return int(L)+1  # M. F. Hasler, Apr 08 2024

Formula

a(A046760(n)) < A050252(A046760(n)); a(A046759(n)) > A050252(A046759(n)). - Reinhard Zumkeller, Jun 21 2011
a(n) = A196563(n) + A196564(n).
a(n) = 1 + floor(log_10(n)) = 1 + A004216(n) = ceiling(log_10(n+1)) = A004218(n+1), if n >= 1. - Daniel Forgues, Mar 27 2014
a(A046758(n)) = A050252(A046758(n)). - Reinhard Zumkeller, Jun 21 2011
a(n) = A117804(n+1) - A117804(n), n > 0. - Hieronymus Fischer, Jun 08 2012
G.f.: g(x) = 1 + (1/(1-x))*Sum_{j>=0} x^(10^j). - Hieronymus Fischer, Jun 08 2012
a(n) = A262190(n) for n < 100; a(A262198(n)) != A262190(A262198(n)). - Reinhard Zumkeller, Sep 14 2015

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

A046758 Equidigital numbers.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 11, 13, 14, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 35, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 105, 106, 107, 109, 111, 112, 113, 115, 118, 119, 121, 122, 123, 127, 129, 131, 133, 134, 135, 137, 139
Offset: 1

Views

Author

Keywords

Comments

Write n as product of primes raised to powers, let D(n) = A050252 = total number of digits in product representation (number of digits in all the primes plus number of digits in all the exponents that are greater than 1) and l(n) = number of digits in n; sequence gives n such that D(n)=l(n).
The term "equidigital number" was coined by Recamán (1995). - Amiram Eldar, Mar 10 2024

Examples

			For n = 125 = 5^3, l(n) = 3 but D(n) = 2. So 125 is not a member of this sequence.
		

References

  • Bernardo Recamán Santos, Equidigital representation: problem 2204, J. Rec. Math., Vol. 27, No. 1 (1995), pp. 58-59.

Crossrefs

Programs

  • Haskell
    a046758 n = a046758_list !! (n-1)
    a046758_list = filter (\n -> a050252 n == a055642 n) [1..]
    -- Reinhard Zumkeller, Jun 21 2011
    
  • Mathematica
    edQ[n_] := Total[IntegerLength[DeleteCases[Flatten[FactorInteger[n]], 1]]] == IntegerLength[n]; Join[{1}, Select[Range[140], edQ]] (* Jayanta Basu, Jun 28 2013 *)
  • 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 A046758_gen(): # generator of terms
        return (n for n in count(1) if n == 1 or len(str(n)) == sum(len(str(p))+(len(str(e)) if e > 1 else 0) for p, e in factorint(n).items()))
    A046758_list = list(islice(A046758_gen(),20)) # Chai Wah Wu, Feb 18 2022

Formula

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

Extensions

More terms from Eric W. Weisstein

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

A254315 Number of distinct digits in the prime factorization of n (counting terms of the form p^1 as p).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 2, 2, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3
Offset: 2

Views

Author

Michel Lagneau, Jan 28 2015

Keywords

Comments

Write n as product of primes raised to powers; then a(n) is the total number of distinct digits in product representation (number of distinct digits in all the primes and number of distinct digits in all the exponents that are greater than 1).
a(n)<=10. The least n such that a(n)=10 is n = 41701690 = 2*5*47*83*1069.
Property: a(p) = A043537(p), for p prime.
From Michel Marcus, Feb 21 2015: (Start)
For p in A038604, a(p^2) = A043537(p) + 1.
For p in A038611, a(p^3) = A043537(p) + 1.
For p in A038612, a(p^4) = A043537(p) + 1.
For p in A038613, a(p^5) = A043537(p) + 1.
For p in A038614, a(p^6) = A043537(p) + 1.
For p in A038615, a(p^7) = A043537(p) + 1.
For p in A038616, a(p^8) = A043537(p) + 1.
For p in A038617, a(p^9) = A043537(p) + 1.
(End)

Examples

			a(36)=2 because 36 = 2^2 * 3^2 => 2 distinct digits.
a(414)=2 because 414 = 2 * 3^2 * 23 => 2 distinct digits.
		

Crossrefs

Programs

  • Maple
    with(ListTools):
    nn:=100:
      for n from 2 to nn do:
        n0:=length(n):lst:={}:x0:=ifactors(n):
        y:=Flatten(x0[2]):z:=convert(y,set):
        z1:=z minus {1}:nn0:=nops(z1):
         for k from 1 to nn0 do :
          t1:=convert(z1[k],base,10):z2:=convert(t1,set):
          lst:=lst union z2:
         od:
         nn1:=nops(lst):printf(`%d, `,nn1):
         od :
  • Mathematica
    f[n_] := Block[{pf = FactorInteger@ n, i}, Length@ DeleteDuplicates@ Flatten@ IntegerDigits@ Rest@ Flatten@ Reap@ Do[If[Last[pf[[i]]] == 1, Sow@ First@ pf[[i]], Sow@ FromDigits@ Flatten[IntegerDigits /@ pf[[i]]]], {i, Length@ pf}]]; Array[f,100] (* Michael De Vlieger, Jan 29 2015 *)
  • PARI
    print1(1,", ");for(k=2,100,s=[];F=factor(k);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));print1(#vecsort(s,,8),", ")) \\ Derek Orr, Jan 30 2015
    
  • Python
    from sympy import factorint
    def A254315(n):
        return len(set([x for l in [[d for d in str(p)]+[d for d in str(e) if d != '1'] for p,e in factorint(n).items()] for x in l]))
    # Chai Wah Wu, Feb 24 2015

A377369 a(n) = total number of bits in the binary representation of the prime factorization of n (including exponents > 1).

Original entry on oeis.org

0, 2, 2, 4, 3, 4, 3, 4, 4, 5, 4, 6, 4, 5, 5, 5, 5, 6, 5, 7, 5, 6, 5, 6, 5, 6, 4, 7, 5, 7, 5, 5, 6, 7, 6, 8, 6, 7, 6, 7, 6, 7, 6, 8, 7, 7, 6, 7, 5, 7, 7, 8, 6, 6, 7, 7, 7, 7, 6, 9, 6, 7, 7, 5, 7, 8, 7, 9, 7, 8, 7, 8, 7, 8, 7, 9, 7, 8, 7, 8, 5, 8, 7, 9, 8, 8, 7, 8, 7, 9
Offset: 1

Views

Author

Paolo Xausa, Dec 27 2024

Keywords

Examples

			a(10) = 5 because 10 = 2*5 = 10_2*101_2 (5 total bits).
a(18) = 6 because 18 = 2*3^2 = 10_2*11_2^10_2 (6 total bits).
		

Crossrefs

Cf. A050252 (analogous for base 10).
Cf. A070939.

Programs

  • Mathematica
    A377369[n_] := Total[BitLength[Select[Flatten[FactorInteger[n]], # > 1 &]]];
    Array[A377369, 100]
  • PARI
    a(n)={my(f=factor(n)); sum(i=1, #f~, 1 + logint(f[i,1],2) + (f[i,2]>1) + logint(f[i,2],2))} \\ Andrew Howroyd, Dec 29 2024
  • Python
    from sympy import factorint
    def a(n): return sum(len(bin(p)[2:])+(len(bin(e)[2:]) if e>1 else 0) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Dec 27 2024
    

A110475 Number of symbols '*' and '^' to write the canonical prime factorization of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 1, 2, 0, 2, 0, 1, 1, 1, 1, 3, 0, 1, 1, 2, 0, 2, 0, 2, 2, 1, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 1, 0, 3, 0, 1, 2, 1, 1, 2, 0, 2, 1, 2, 0, 3, 0, 1, 2, 2, 1, 2, 0, 2, 1, 1, 0, 3, 1, 1, 1, 2, 0, 3, 1, 2, 1, 1, 1, 2, 0, 2, 2, 3, 0, 2, 0, 2, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 08 2005

Keywords

Comments

It is conjectured that 1,2,3,4,5,6,7,9,11 are the only positive integers which cannot be represented as the sum of two elements of indices n such that a(n) = 1. - Jonathan Vos Post, Sep 11 2005
a(n) = 2 iff n is a sphenic number (A007304) or n is a prime p times a prime power q^e with e > 1 and q not equal to p. a(n) = 3 iff n has exactly four distinct prime factors (A046386); or n is the product of two prime powers (p^e)*(q^f) with e > 1, f > 1 and p not equal to q; or n is a semiprime s times a prime power r^g with g > 1 and r relatively prime to s. For a(n) > 3, Reinhard Zumkeller's description is a simpler description than the above compound descriptions. - Jonathan Vos Post, Sep 11 2005

Examples

			a(208029250) = a(2*5^3*11^2*13*23^2) = 4 '*' + 3 '^' = 7.
		

Crossrefs

Programs

  • Haskell
    a110475 1 = 0
    a110475 n = length us - 1 + 2 * length vs where
                (us, vs) = span (== 1) $ a118914_row n
    -- Reinhard Zumkeller, Mar 23 2014
  • Mathematica
    A110475[n_] := 2*Length[#] - 1 - Count[#, 1] & [FactorInteger[n][[All, 2]]];
    Array[A110475, 100] (* Paolo Xausa, Mar 10 2025 *)

Formula

a(n) = A001221(n) - 1 + A056170(n) for n > 1.
a(n) = 0 iff n=1 or n is prime: a(A008578(n)) = 0.
a(n) = 1 iff n is a semiprime or a prime power p^e with e > 1.
From Amiram Eldar, Sep 27 2024: (Start)
a(n) = A238949(n) - 1 for n >= 2.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C - 1), where B is Mertens's constant (A077761) and C = Sum_{p prime} 1/p^2 (A085548). (End)

A192010 The smallest number with n digits in its prime factorization (total count of digits of all bases and exponents).

Original entry on oeis.org

1, 4, 12, 36, 132, 396, 1716, 5148, 25740, 87516, 437580, 1662804, 8314020, 38244492, 167943204, 839716020, 3862693692, 17298150012, 86490750060, 397857450276, 1850902051284, 9254510256420, 42570747179532, 201748323589956, 1008741617949780, 4640211442568988
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 21 2011

Keywords

Comments

A050252(a(n)) = n and A050252(m) <> n for m < a(n);

Examples

			a(2) = 4 = 2^2 and A050252(12) = (1+1) = 2;
a(3) = 12 = 2^2 * 3 and A050252(12) = (1+1) + 1 = 3;
a(4) = 36 = 2^2 * 3^2 and A050252(36) = (1+1) + (1+1) = 4;
a(5) = 132 = 2^2 * 3 * 11 and A050252(132) = (1+1) + 1 + 2 = 5;
a(6) = 396 = 2^2 * 3^2 * 11 and A050252(396) = (1+1) + (1+1) + 2 = 6;
a(7) = 1716 = 2^2 * 3 * 11 * 13 and A050252(1716) = (1+1) + 1 + 2 + 2 = 7;
a(8) = 5148 = 2^2 * 3^2 * 11 * 13 and A050252(5148) = (1+1) + (1+1) + 2 + 2 = 8;
a(9) = 25740 = 2^2 * 3^2 * 5 * 11 * 13 and A050252(25740) = (1+1) + (1+1) + 1 + 2 + 2 = 9;
a(10) = 87516 = 2^2 * 3^2 * 11 * 13 * 17 and A050252(87516) = (1+1) + (1+1) + 2 + 2 + 2 = 10;
a(11) = 437580 = 2^2 * 3^2 * 5 * 11 * 13 * 17 and A050252(437580) = (1+1) + (1+1) + 1 + 2 + 2 + 2 = 11;
a(12) = 1662804 = 2^2 * 3^2 * 11 * 13 * 17 * 19 and A050252(1662804) = (1+1) + (1+1) + 2 + 2 + 2 + 2 = 12;
a(13) = 8314020 = 2^2 * 3^2 * 5 * 11 * 13 * 17 * 19 and A050252(8314020) = (1+1) + (1+1) + 1 + 2 + 2 + 2 + 2 = 13.
		

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a192010 n = succ $ fromJust $ elemIndex n $ map a050252 [1..]

Extensions

a(14)-a(26) from Donovan Johnson, Jul 03 2011
Showing 1-9 of 9 results.