A011539 "9ish numbers": decimal representation contains at least one nine.
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
Examples
E.g. 9, 19, 69, 90, 96, 99 and 1234567890 are all 9ish.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- D. Applegate, C program for lunar arithmetic and number theory [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
- D. Applegate, M. LeBrun, and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
- Index entries for sequences related to dismal (or lunar) arithmetic
- Index entries for 10-automatic sequences.
Crossrefs
Cf. A088924 (number of n-digit terms).
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
Comments