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 17 results. Next

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)

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

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;
		

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

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

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

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

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

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.
		

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

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

A379537 Frugal numbers in base 2: numbers k such that A377369(k) < A070939(k).

Original entry on oeis.org

1, 27, 32, 49, 64, 81, 121, 125, 128, 135, 147, 162, 169, 189, 192, 243, 250, 256, 289, 297, 320, 338, 343, 351, 361, 363, 375, 384, 405, 448, 486, 507, 512, 513, 529, 539, 567, 576, 578, 605, 621, 625, 637, 640, 648, 675, 686, 704, 722, 729, 750, 768, 783, 832
Offset: 1

Author

Paolo Xausa, Dec 25 2024

Keywords

Comments

A frugal number in base 2 is a number with more bits than the total number of bits of its prime factorization (including exponents > 1).
Following the definition by Pinch (1998), 1 is considered a frugal number.
Some authors call these numbers "economical numbers", as in A046759 which, according to the definition provided here, lists frugal numbers in base 10 (additionally, A046759 does not include 1).

Examples

			32 is a term because 32 = 2^5 = 10_2^101_2; the total number of bits of (10_2, 101_2) = 5 < the number of bits of 32 = 100000_2 (6).
135 is a term because 135 = 3^3*5 = 11_2^11_2*101_2; the total number of bits of (11_2, 11_2, 101_2) = 7 < the number of bits of 135 = 10000111_2 (8).
		

Crossrefs

Row n = 2 of A379538.

Programs

  • Mathematica
    A379537Q[k_] := Total[BitLength[Select[Flatten[FactorInteger[k]], # > 1 &]]] < BitLength[k];
    Select[Range[1000], A379537Q]

A379538 Square array read by ascending antidiagonals: T(n,k) is the k-th frugal number in base n.

Original entry on oeis.org

1, 1, 27, 1, 32, 32, 1, 27, 49, 49, 1, 27, 64, 64, 64, 1, 81, 81, 81, 81, 81, 1, 64, 125, 125, 121, 98, 121, 1, 64, 81, 243, 128, 125, 121, 125, 1, 81, 81, 125, 250, 162, 128, 125, 128, 1, 125, 125, 125, 243, 256, 169, 169, 128, 135, 1, 125, 128, 128, 128, 343, 289, 243, 243, 169, 147
Offset: 2

Author

Paolo Xausa, Dec 25 2024

Keywords

Comments

A frugal number in base n is a number with more digits (in its base n representation) than the total number of digits (in base n representation) of its prime factorization (including exponents > 1).
Following the definition by Pinch (1998), 1 is considered a frugal number.
Some authors call these numbers "economical numbers", as in A046759 which, according to the definition provided here, lists frugal numbers in base 10 (additionally, A046759 does not include 1).

Examples

			Array begins:
  n\k| 1    2    3    4    5    6    7    8    9    10  ...
  ---------------------------------------------------------
   2 | 1,  27,  32,  49,  64,  81, 121, 125, 128,  135, ... = A379537
   3 | 1,  32,  49,  64,  81,  98, 121, 125, 128,  169, ...
   4 | 1,  27,  64,  81, 121, 125, 128, 169, 243,  256, ...
   5 | 1,  27,  81, 125, 128, 162, 169, 243, 256,  289, ...
   6 | 1,  81, 125, 243, 250, 256, 289, 343, 361,  375, ...
   7 | 1,  64,  81, 125, 243, 343, 361, 375, 405,  486, ...
   8 | 1,  64,  81, 125, 128, 243, 343, 512, 529,  567, ...
   9 | 1,  81, 125, 128, 243, 256, 343, 625, 729,  768, ...
  10 | 1, 125, 128, 243, 256, 343, 512, 625, 729, 1024, ... = A046759 (without the initial 1)
  ...       |                                         \______ A379539 (main diagonal)
         A377478
T(2,10) = 135 because 135 = 3^3*5 = 11_2^11_2*101_2; the total number of bits of (11_2, 11_2, 101_2) = 7 < the number of bits of 135 = 10000111_2 (8); and 135 is the tenth number with this property.
		

Crossrefs

Cf. A377478 (column k = 2), A379537 (row n = 2), A046759 (row n = 10), A379539 (main diagonal).
Cf. A379373.

Programs

  • Mathematica
    Module[{dmax = 15, a, m}, a = Table[m = 0; Table[While[Total[IntegerLength[Select[Flatten[FactorInteger[++m]], # > 1 &], n]] >= IntegerLength[m, n]]; m, dmax-n+2], {n, dmax+1, 2, -1}]; Array[Diagonal[a, # - dmax] &, dmax]]

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

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.
		

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
Showing 1-10 of 17 results. Next