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-10 of 11 results. Next

A073048 Starting term of the first length-n chain of equidigital numbers (A046758).

Original entry on oeis.org

5, 10, 1, 191, 13, 1134, 157, 1169312, 100149391, 1016258233, 107375450119, 10271593487494
Offset: 1

Views

Author

Lekraj Beedassy, Aug 31 2002

Keywords

Examples

			13 is in the sequence because prime decompositions of 13 through 17, i.e. 13, 14=2*7, 15=3*5, 16=2^4, 17, use as many digits as their normal decimal representation.
		

References

  • Journal of Recreational Mathematics, 29(2) 138 1998, Solution to Problem 2209 "Equidigital Representation"

Crossrefs

Cf. A046758.

Extensions

a(9) corrected and a(11) from Donovan Johnson, Jul 30 2010
a(12) from Giovanni Resta, Aug 14 2013

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

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

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

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. also A377369 (analog for base 2).

Programs

  • Haskell
    a050252 1 = 1
    a050252 n = sum $ map a055642 $
                (a027748_row n) ++ (filter (> 1) $ a124010_row n)
    -- Reinhard Zumkeller, Aug 03 2013, Jun 21 2011
    
  • Mathematica
    nd[n_]:=Total@IntegerLength@Select[Flatten@FactorInteger[n],#>1&];Table[If[n==1,1,nd[n]],{n,102}] (* Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else sum(len(str(p))+(len(str(e)) if e>1 else 0) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Dec 27 2024

Formula

a(A192010(n)) = n and a(m) != n for m < A192010(n);
a(A046759(n)) < A055642(A046759(n)); a(A046758(n)) = A055642(A046758(n)); a(A046760(n)) > A055642(A046760(n)). [Reinhard Zumkeller, Jun 21 2011]

A254318 Hyper equidigital numbers.

Original entry on oeis.org

2, 3, 4, 5, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 28, 29, 31, 32, 35, 36, 37, 39, 41, 43, 46, 47, 49, 50, 53, 54, 58, 59, 61, 64, 67, 69, 71, 72, 73, 79, 81, 83, 89, 92, 93, 97, 98, 100, 101, 103, 104, 105, 106, 107, 109, 113, 116, 119
Offset: 1

Views

Author

Michel Lagneau, Jan 28 2015

Keywords

Comments

The distinction between the equidigital numbers (A046758) is that only the distinct digits are counted instead of all digits. Hence the definition:
Write n as product of primes raised to powers, let D(n) = 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) and nbd(n) = A043537(n) = number of distinct digits in n; sequence gives n such that D(n) = nbd(n).

Examples

			116 is in the sequence because 116 = 2^2*29 => D(116)= A043537(116)=2.
		

Crossrefs

Programs

  • Mathematica
    Cases[Range[400], n_ /; Length[Union[Flatten[IntegerDigits[FactorInteger[n] /. 1 -> Sequence[]]]]]==Length[Union[Flatten[IntegerDigits[n]]]]]
  • PARI
    for(n=1,100,s=[];F=factor(n);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));if(#vecsort(digits(n),,8)==#vecsort(s,,8),print1(n,", "))) \\ Derek Orr, Jan 30 2015

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

A254319 Hyper economical numbers.

Original entry on oeis.org

27, 108, 125, 128, 129, 135, 138, 143, 159, 160, 184, 187, 189, 196, 207, 209, 216, 219, 243, 249, 256, 259, 265, 276, 295, 297, 329, 341, 351, 375, 403, 429, 451, 458, 469, 497, 512, 529, 621, 625, 671, 679, 729, 781, 795, 837, 841, 892, 896, 908, 916, 932
Offset: 1

Views

Author

Michel Lagneau, Jan 28 2015

Keywords

Comments

The distinction between the economical numbers (A046759) is that the distinct digits are counted only instead all digits. Hence the definition:
Write n as product of primes raised to powers, let D(n) = 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) and nbd(n) = A043537(n) number of distinct digits in n; sequence gives n such that D(n) < nbd(n).

Examples

			27 is in the sequence because 27 = 3 ^ 3 => D(27)= 1 < nbd(27)=2.
		

Crossrefs

Programs

  • Mathematica
    Cases[Range[400], n_ /; Length[Union[Flatten[IntegerDigits[FactorInteger[n] /. 1 -> Sequence[]]]]]< Length[Union[Flatten[IntegerDigits[n]]]]]
  • PARI
    for(n=1,10^3,s=[];F=factor(n);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));if(#vecsort(digits(n),,8)>#vecsort(s,,8),print1(n,", "))) \\ Derek Orr, Jan 30 2015

A254321 Hyper Wasteful numbers.

Original entry on oeis.org

6, 8, 9, 22, 26, 30, 33, 34, 38, 40, 42, 44, 45, 48, 51, 52, 55, 56, 57, 60, 62, 63, 65, 66, 68, 70, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 94, 95, 96, 99, 102, 110, 111, 112, 114, 115, 117, 118, 122, 130, 133, 136, 141, 144, 152, 153, 155, 161
Offset: 1

Views

Author

Michel Lagneau, Jan 28 2015

Keywords

Comments

The distinction between the Wasteful numbers (A046760) is that the distinct digits are counted only instead all digits. Hence the definition:
Write n as product of primes raised to powers, let D(n) = 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) and nbd(n) = A043537(n) = number of distinct digits in n; sequence gives n such that D(n) > nbd(n).

Examples

			88 is in the sequence because 88 = 2 ^ 3 * 11 => D(88)=3 > nbd(88)=1.
		

Crossrefs

Programs

  • Mathematica
    Cases[Range[400], n_ /; Length[Union[Flatten[IntegerDigits[FactorInteger[n] /. 1 -> Sequence[]]]]] > Length[IntegerDigits[n]]]
  • PARI
    for(n=1,100,s=[];F=factor(n);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));if(#vecsort(digits(n),,8)<#vecsort(s,,8),print1(n,", "))) \\ Derek Orr, Jan 30 2015

A172460 Partial sums of economical numbers A046759.

Original entry on oeis.org

125, 253, 496, 752, 1095, 1607, 2232, 2961, 3985, 5014, 6229, 7479, 8759, 10090, 11459, 12917, 14453, 16134, 17835, 19550, 21342, 23191, 25066, 27114, 29301, 31498, 33707, 36108, 38668, 41477, 44602, 48083, 51667, 55312, 59033, 63129
Offset: 1

Views

Author

Jonathan Vos Post, Feb 03 2010

Keywords

Comments

The subsequence of prime partial sum of economical numbers begins: 1607, 6229, 12917, 76367. The subsequence of economical partial sum of economical numbers begins: 125; what is the first nontrivial economical partial sum of economical numbers?

Examples

			a(41) = 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.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] {n written as a product of primes raised to powers, where D(n) = number of digits in product, l(n) = number of digits in n; sequence gives n such that D(n)
Showing 1-10 of 11 results. Next