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

A089583 Numbers n which are a multiple of A068505(n) (= n read in base m+1 where m = largest digit of n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 21, 29, 39, 40, 49, 59, 69, 79, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 109, 112, 119, 120, 129, 139, 149, 159, 169, 179, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 209, 210, 219, 229, 239, 249, 259, 269, 279, 289
Offset: 1

Views

Author

Chuck Seggelin, Nov 08 2003

Keywords

Comments

Note that all single-digit numbers are included as they equal themselves when converted to base b+1. 3 in base 4 is 3 and of course divides evenly into the original value of 3. Note also that all numbers containing the digit 9 can only be interpreted as base-10 numbers, which of course divide themselves. These represent the trivial sequence members. A nontrivial member would be a value like 624, which when interpreted as a base-7 number yields 312 in base 10 which evenly divides 624. See sequence A089584 for the nontrivial members of this sequence.

Examples

			a(10)=10 because when 10 is interpreted as base 2 and converted back to base 10, the result, 2, divides evenly into 10.
		

Crossrefs

Cf. A054055 (largest digit of n), A068505 (n as base b+1 number where b=largest digit of n), A089584 (nontrivial members of this sequence).

Programs

  • Mathematica
    bQ[n_]:=Module[{idn=IntegerDigits[n]},Divisible[n,FromDigits[idn, Max[ idn]+1]]]; Select[Range[300],bQ] (* Harvey P. Dale, Aug 30 2014 *)
  • PARI
    is_A089583(n,d,b)= 9<(b=1+vecmax(d=eval(Vec(Str(n))))) || n%sum(i=1,#d,d[i]*b^(#d-i))==0 \\ M. F. Hasler, Apr 05 2009

Extensions

Definition reworded, minor corrections by M. F. Hasler, Apr 05 2009

A089584 Numbers n which are a proper multiple (>1) of A068505(n) (= n read in base m+1 where m = largest digit of n).

Original entry on oeis.org

10, 21, 40, 100, 112, 120, 210, 306, 400, 516, 624, 630, 1000, 1010, 1102, 1320, 1344, 1422, 2223, 2240, 2301, 3430, 4000, 10000, 10100, 10101, 10356, 10360, 11220, 12320, 13440, 14220, 20202, 21112, 21210, 21416, 22400, 30303, 33036, 34300
Offset: 1

Views

Author

Chuck Seggelin, Nov 08 2003

Keywords

Comments

Terms > 9 in A089583 without digit "9". - M. F. Hasler, Apr 05 2009
This sequence excludes the trivial terms of A089583. Note that all single-digit numbers are excluded as they equal themselves when converted to base b+1. 3 in base 4 is 3 and of course divides the original value of 3. Note also that all numbers containing the digit 9 can only be interpreted as base-10 numbers, which of course divide themselves once and are therefore excluded. See sequence A089583 for the full sequence including trivial terms.

Examples

			a(5)=112 because 112 in base 3 yields 14 in base 10, which evenly divides 112 (112/14 = 8). a(21)=2301 because 2301 in base 4 yields 177, which evenly divides 2301 (2301/177=13).
		

Crossrefs

Cf. A054055 (largest digit of n), A068505 (n as base b+1 number where b=largest digit of n), A089583 (n mod A068505(n) = 0).

Programs

  • PARI
    is_A089584(n,d,b)={ 10>(b=1+vecmax(d=eval(Vec(Str(n))))) & n%sum(i=1,#d,d[i]*b^(#d-i))==0 }

Extensions

Definition reworded by M. F. Hasler, Apr 05 2009

A007095 Numbers in base 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84
Offset: 0

Views

Author

Keywords

Comments

Also numbers without 9 as a digit.
Complement of A011539: A102683(a(n)) = 0; A068505(a(n)) != a(n)). - Reinhard Zumkeller, Dec 29 2011

References

  • Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000042 (base 1), A007088 (base 2), A007089 (base 3), A007090 (base 4), A007091 (base 5), A007092 (base 6), A007093 (base 7), A007094 (base 8); A057104, A037479.
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8).
Cf. A082838.

Programs

  • Haskell
    a007095 = f . subtract 1 where
       f 0 = 0
       f v = 10 * f w + r   where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014, Dec 29 2011
    
  • Magma
    [ n: n in [0..74] | not 9 in Intseq(n) ];  // Bruno Berselli, May 28 2011
    
  • Maple
    A007095 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n,base,9): return op(convert(l,base,10,10^nops(l))): end: seq(A007095(n),n=0..67); # Nathaniel Johnston, May 06 2011
  • Mathematica
    Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 75}]
  • PARI
    a(n)=if(n<1,0,if(n%9,a(n-1)+1,10*a(n/9)))
    
  • PARI
    A007095(n)=fromdigits(digits(n, 9)) \\ Michel Marcus, Dec 29 2018
    
  • Python
    # and others: see OEIS Wiki page (cf. LINKS).
    
  • Python
    from gmpy2 import digits
    def A007095(n): return int(digits(n,9)) # Chai Wah Wu, May 06 2025
  • sh
    seq 0 1000 | grep -v 9; # Joerg Arndt, May 29 2011
    

Formula

a(0) = 0, a(n) = 10*a(n/9) if n==0 (mod 9), a(n) = a(n-1)+1 otherwise. - Benoit Cloitre, Dec 22 2002
Sum_{n>1} 1/a(n) = A082838 = 22.92067... (Kempner series). - Bernard Schott, Dec 29 2018; edited by M. F. Hasler, Jan 13 2020

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

A091049 a(n) = first term which reduces to an unchanging value in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n).

Original entry on oeis.org

1, 10, 15, 17, 18, 58, 72, 80, 88, 507, 683, 838, 1384, 1807, 3417, 12651, 18316, 41841, 80852, 132815, 388315, 1182482, 2202048, 6408851, 15438855, 34630248, 72141683, 332386516, 764388521, 1867287828, 5451218338, 24187765577, 68380483575, 215445843883, 677083325011
Offset: 0

Views

Author

Chuck Seggelin, Dec 15 2003, Jul 09 2008

Keywords

Comments

There is no maximum number of steps and for any value of n, there MUST be a term a(n) that reduces in n steps. This is demonstrable as follows: take any term in the above sequence and convert it to base 2. The resulting value, if interpreted as a base 10 value will require one additional step to reduce. The resulting value may not be the FIRST value to resolve in that many steps, however, so it may not belong in this sequence.

Examples

			a(0) = 1 because 1 is the first term that reduces to an unchanging value in zero steps (i.e. 1 is already fully reduced.) a(1) = 10 because 10 reduces in one step (10 in base 2 is 2, 2 does not reduce further.) a(8) = 88 because 88 reduces in 8 steps: 88 --> 80 --> 72 --> 58 --> 53 --> 33 --> 15 --> 11 --> 3.
		

Crossrefs

Cf. A054055 (largest digit of n) A068505 (n as base b+1 number where b=largest digit of n) A091047 (a(n) = the final value of n reached through repeated interpretation of n as a base b+1 number where b is the largest digit of n) A091048 (number of times n must be interpreted as a base b+1 number where b is the largest digit of n until an unchanging value is reached).

Programs

  • Python
    def A091049(n):
        k = 1
        while True:
            m1 = k
            for i in range(n+1):
                m2 = int(str(m1),1+max(int(d) for d in str(m1)))
                if m1 == m2:
                    if i == n:
                        return k
                    else:
                        break
                m1 = m2
            k += 1 # Chai Wah Wu, Jan 07 2015

Extensions

a(30)-a(31) from Chai Wah Wu, Jan 14 2015

A091048 a(n) = the number of steps needed to reach the final value of n via repeated interpretation of n as a base b+1 number where b is the largest digit of n.

Original entry on oeis.org

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

Views

Author

Chuck Seggelin, Dec 15 2003

Keywords

Comments

Any value of n with at least one digit 9 will not reduce further since 9+1 is 10 and n in base 10 is n. Also any single-digit number will likewise not reduce further. Such values of n therefore require 0 steps to reduce. Many terms reduce in very few steps and others take longer (88 for example, takes 8 steps). There is no maximum number of steps. See A091049 to see the first term requiring n steps. See A091047 to see the actual unchanging value reached for each value of n.

Examples

			a(18)=4 because (1) 18 in base 9 is 17. (2) 17 in base 8 is 15. (3) 15 in base 6 is 11. (4) 11 in base 2 is 3. 3 does not reduce further because 3 in base 4 is 3. Thus 18 reduces to 3 in 4 steps.
		

Crossrefs

Cf. A054055 (largest digit of n) A068505 (n as base b+1 number where b=largest digit of n) A091047 (a(n) = the final value of n reached through repeated interpretation of n as a base b+1 number where b is the largest digit of n) A091049 (a(n) = first term which reduces to an unchanging value in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n)).

Programs

  • Maple
    f:= proc(n) option remember;
       local L,b,i;
       if n < 10 then return 0 fi;
       L:= convert(n,base,10);
       b:= max(L)+1;
       if b = 10 then 0 else 1+procname(add(L[i]*b^(i-1),i=1..nops(L))) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 19 2018

A091047 a(n) = the final value of n reached through repeated interpretation of n as a base b+1 number where b is the largest digit of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 5, 7, 9, 3, 7, 3, 3, 19, 6, 7, 8, 3, 9, 3, 6, 3, 6, 29, 5, 7, 9, 3, 19, 3, 3, 7, 3, 39, 6, 7, 8, 3, 9, 29, 19, 39, 9, 49, 5, 7, 9, 3, 19, 3, 7, 39, 3, 59, 8, 3, 9, 29, 19, 39, 9, 3, 9, 69, 7, 39, 3, 59, 8, 3, 9, 29, 39, 79, 3, 59, 8, 3, 9, 29, 39, 79, 3, 89, 90, 91, 92
Offset: 1

Views

Author

Chuck Seggelin, Dec 15 2003

Keywords

Comments

Any value of n with at least one digit 9 will not reduce further since 9+1 is 10 and n in base 10 is n. Also any single-digit number will likewise not reduce further. Many terms reduce in very few steps and others take longer (88 for example, takes 8 steps). See A091048 for the number of steps for each value of n. There is no maximum number of steps. See A091049 to see the first term requiring n steps.

Examples

			a(18)=3 because 18 in base 9 is 17. 17 in base 8 is 15. 15 in base 6 is 11. 11 in base 2 is 3. 3 does not reduce further because 3 in base 4 is 3. Thus 18 reduces to 3 in 4 steps.
		

Crossrefs

Cf. A054055 (largest digit of n) A068505 (n as base b+1 number where b=largest digit of n) A091048 (number of times n must be interpreted as a base b+1 number where b is the largest digit of n until an unchanging value is reached) A091049 (a(n) = first term which reduces to an unchanging value in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n)).

A368160 For any n > 0, a(n) is obtained by interpreting the factorial base expansion of n in base m + 1, where m is the maximum digit in the factorial base expansion of n; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 4, 5, 6, 7, 15, 16, 18, 19, 21, 22, 24, 25, 48, 49, 52, 53, 56, 57, 8, 9, 10, 11, 33, 34, 12, 13, 14, 15, 42, 43, 45, 46, 48, 49, 51, 52, 112, 113, 116, 117, 120, 121, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79
Offset: 0

Views

Author

Rémy Sigrist, Dec 14 2023

Keywords

Comments

Every nonnegative integer appears finitely many times in this sequence.

Examples

			For n = 42: the factorial base expansion of 42 is "1300" and has maximum digit 3, so the base-4 expansion of a(42) is "1300", and a(42) = 112.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (d = []); for (r = 2, oo, if (n==0, return (if (#d, fromdigits(d, vecmax(d)+1), 0)), d = concat(n%r, d); n \=r;);); }

Formula

a(A059590(n)) = n.
a(k!) = 2^(k-1) for any k > 0.
Showing 1-8 of 8 results.