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-6 of 6 results.

A011539 "9ish numbers": decimal representation contains at least one nine.

Original entry on oeis.org

9, 19, 29, 39, 49, 59, 69, 79, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 109, 119, 129, 139, 149, 159, 169, 179, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 209, 219, 229, 239, 249, 259, 269, 279, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298
Offset: 1

Views

Author

Keywords

Comments

The 9ish numbers are closed under lunar multiplication. The lunar primes (A087097) are a subset.
Almost all numbers are 9ish, in the sense that the asymptotic density of this set is 1: Among the 9*10^(n-1) n-digit numbers, only a fraction of 0.8*0.9^(n-1) doesn't have a digit 9, and this fraction tends to zero (< 1/10^k for n > 22k-3). This explains the formula a(n) ~ n. - M. F. Hasler, Nov 19 2018
A 9ish number is a number whose largest decimal digit is 9. - Stefano Spezia, Nov 16 2023

Examples

			E.g. 9, 19, 69, 90, 96, 99 and 1234567890 are all 9ish.
		

Crossrefs

Cf. A088924 (number of n-digit terms).
Cf. A087062 (lunar product), A087097 (lunar primes).
A102683 (number of digits 9 in n); fixed points > 8 of A068505.
Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), A337250 (b=4), A337572 (b=5), A333656 (b=6), A337141 (b=7), A337239 (b=8), A338090 (b=9), this sequence (b=10), A095778 (b=11).
Cf. Numbers with no digit b-1 in base b: A005836 (b=3), A023717 (b=4), A020654 (b=5), A037465 (b=6), A020657 (b=7), A037474 (b=8), A037477 (b=9), A007095 (b=10), A171397 (b=11).
Supersequence of A043525.

Programs

  • GAP
    Filtered([1..300],n->9 in ListOfDigits(n)); # Muniru A Asiru, Feb 25 2019
    
  • Haskell
    a011539 n = a011539_list !! (n-1)
    a011539_list = filter ((> 0) . a102683) [1..]  -- Reinhard Zumkeller, Dec 29 2011
    
  • Maple
    seq(`if`(numboccur(9, convert(n, base, 10))>0, n, NULL), n=0..100); # François Marques, Oct 12 2020
  • Mathematica
    Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 10 ], 9 ]>0)& ] (* François Marques, Oct 12 2020 *)
    Select[Range[300],DigitCount[#,10,9]>0&] (* Harvey P. Dale, Mar 04 2023 *)
  • PARI
    is(n)=n=vecsort(digits(n));n[#n]==9 \\ Charles R Greathouse IV, May 15 2013
    
  • PARI
    select( is_A011539(n)=vecmax(digits(n))==9, [1..300]) \\ M. F. Hasler, Nov 16 2018
    
  • Python
    def ok(n): return '9' in str(n)
    print(list(filter(ok, range(299)))) # Michael S. Branicky, Sep 19 2021
    
  • Python
    def A011539(n):
        def f(x):
            l = (s:=str(x)).find('9')
            if l >= 0: s = s[:l]+'8'*(len(s)-l)
            return n+int(s,9)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Dec 04 2024

Formula

Complement of A007095. A102683(a(n)) > 0 (defines this sequence). A068505(a(n)) = a(n): fixed points of A068505 are the terms of this sequence and the numbers < 9. - Reinhard Zumkeller, Dec 29 2011, edited by M. F. Hasler, Nov 16 2018
a(n) ~ n. - Charles R Greathouse IV, May 15 2013

A016189 a(n) = 10^n - 9^n.

Original entry on oeis.org

0, 1, 19, 271, 3439, 40951, 468559, 5217031, 56953279, 612579511, 6513215599, 68618940391, 717570463519, 7458134171671, 77123207545039, 794108867905351, 8146979811148159, 83322818300333431, 849905364703000879, 8649148282327007911, 87842334540943071199, 890581010868487640791
Offset: 0

Views

Author

Keywords

Comments

Almost all numbers contain any given sequence of digits (in any base) [Theorem 143 of Hardy and Wright]. a(7) = 5217031, more than 52% of the numbers < 10^7 contain any given nonzero decimal digit. - Frank Ellermann, May 30 2001
a(n) gives the number of integers from 0 to 10^n-1 which contain (at least) any one given decimal digit except 0. - Michael Taktikos, Aug 24 2004
These are the numerators of a(n)=(integral{x=0 to 0.2} (1-0.5*x)^n dx). E.g., a(3)=3439/20000. The denominators are b(n)=5*(n+1)*10^n. E.g., b(3)=20000. - Al Hakanson (hawkuu(AT)excite.com), Feb 22 2004
Binomial transforms of sequences defined by a(n)=(C+1)^n-C^n are the sequences (C+2)^n-(C+1)^n. The binomial transform of this here is in A016195, for example. - R. J. Mathar, Nov 27 2008
First differences are given in A088924. - M. F. Hasler, May 04 2015

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 143

Crossrefs

Base 2: A000225, 3: A001047, 4: A005061, 5: A005060, 6: A005062, base 7: A016169, 8: A016177, 9: A016185 11: A016195 12: A016197.
Equals A155671 - 1.

Programs

Formula

G.f.: x/((1-9x)(1-10x)).
a(0) = 0, a(1) = 1, then a(n+1) = 9*a(n) + 10^n.
a(n) = 19*a(n-1) - 90*a(n-2), n > 1; a(0)=0, a(1)=1. - Philippe Deléham, Jan 01 2009
E.g.f.: e^(10*x) - e^(9*x). - Mohammad K. Azarian, Jan 14 2009

A257286 a(n) = 5*6^n - 4*5^n.

Original entry on oeis.org

1, 10, 80, 580, 3980, 26380, 170780, 1087180, 6835580, 42575980, 263268380, 1618672780, 9907349180, 60420657580, 367406757980, 2228854610380, 13495197974780, 81581539411180, 492540994279580, 2970504754739980, 17899322473752380
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 6^n - 5^n = A005062.
a(n-1) is the number of numbers with n digits having the largest digit equal to 5. Or, equivalently, number of n-letter words over a 6-letter alphabet {a,b,c,d,e,f}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Cf. A005062.
Coincides with A125373 only for the first terms.

Programs

  • Magma
    [5*6^n-4*5^n: n in [0..20]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[5 6^n - 4 5^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
  • PARI
    a(n)=5*6^n-4*5^n
    

Formula

a(n) = 11 a(n-1) - 30 a(n-2).
G.f.: (1-x)/((1-5*x)*(1-6*x)). - Vincenzo Librandi, May 04 2015
E.g.f.: exp(5*x)*(5*exp(x) - 4). - Stefano Spezia, Nov 15 2023

A257285 a(n) = 4*5^n - 3*4^n.

Original entry on oeis.org

1, 8, 52, 308, 1732, 9428, 50212, 263348, 1365892, 7026068, 35916772, 182729588, 926230852, 4681485908, 23608756132, 118849087028, 597466660612, 3000218204948, 15052630632292, 75469311591668, 378171191679172, 1894154493279188, 9483966605929252
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 5^n - 4^n = A005060.
a(n-1) is the number of numbers with n digits having the largest digit equal to 4. Note that this is independent of the base b>4. Equivalently, number of n-letter words over a 5-letter alphabet {a,b,c,d,e}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [4*5^n-3*4^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[4 5^n - 3 4^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
  • PARI
    a(n)=4*5^n-3*4^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-4*x)*(1-5*x)).
a(n) = 9*a(n-1) - 20*a(n-2). - (End)
E.g.f.: exp(4*x)*(4*exp(x) - 3). - Stefano Spezia, Nov 15 2023

A257287 a(n) = 6*7^n - 5*6^n.

Original entry on oeis.org

1, 12, 114, 978, 7926, 61962, 472614, 3541578, 26190726, 191733162, 1392520614, 10049975178, 72163811526, 516030592362, 3677517616614, 26134444136778, 185292033880326, 1311149786699562, 9262681804120614, 65346572412186378
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 7^n - 6^n = A016169.
a(n-1) is the number of numbers with n digits having the largest digit equal to 6. Note that this is independent of the base b > 6.
Equivalently, number of n-letter words over a 7-letter alphabet {a,b,c,d,e,f,g}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [6*7^n-5*6^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[6 7^n - 5 6^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{13,-42},{1,12},20] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    a(n)=6*7^n-5*6^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-6*x)*(1-7*x)).
a(n) = 13*a(n-1) - 42*a(n-2). (End)
E.g.f.: exp(6*x)*(6*exp(x) - 5). - Stefano Spezia, Nov 15 2023

A257289 a(n) = 8*9^n - 7*8^n.

Original entry on oeis.org

1, 16, 200, 2248, 23816, 243016, 2416520, 23583688, 226933256, 2159839816, 20378082440, 190918934728, 1778399954696, 16486635929416, 152228014061960, 1400838452135368, 12853836673840136, 117654854901535816, 1074656292809619080, 9798007424852945608
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 9^n - 8^n = A016185.
a(n-1) is the number of numbers with n digits having the largest digit equal to 8. Note that this is independent of the base b > 8.
Equivalently, number of n-letter words over a 9-letter alphabet, which must not start with the last letter of the alphabet, and in which the first letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [8*9^n-7*8^n: n in [0..20]]; // Vincenzo Librandi, May 04 2015
    
  • Mathematica
    Table[8 9^n - 7 8^n, {n, 0, 20}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{17,-72},{1,16},30] (* Harvey P. Dale, May 26 2019 *)
  • PARI
    a(n)=8*9^n-7*8^n
    
  • Sage
    [8*9^n-7*8^n for n in (0..20)] # Bruno Berselli, May 04 2015

Formula

G.f.: (1-x)/((1-8*x)*(1-9*x)). - Vincenzo Librandi, May 04 2015
E.g.f.: exp(8*x)*(8*exp(x) - 7). - Stefano Spezia, Nov 15 2023
Showing 1-6 of 6 results.