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

A068505 Decimal representation of n interpreted in base b+1, where b=A054055(n) is the largest digit in decimal representation of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 6, 7, 8, 11, 14, 17, 20, 23, 26, 29, 12, 13, 14, 15, 19, 23, 27, 31, 35, 39, 20, 21, 22, 23, 24, 29, 34, 39, 44, 49, 30, 31, 32, 33, 34, 35, 41, 47, 53, 59, 42, 43, 44, 45, 46, 47, 48, 55, 62, 69, 56, 57, 58, 59, 60, 61
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 11 2002, Feb 23 2008

Keywords

Comments

a(n) = n iff n < 10 OR n is a "9ish number": a(A011539(n)) = A011539(n). - Reinhard Zumkeller, Dec 29 2011

Examples

			a(20)=2*3^1+0*1=6, a(21)=2*3^1+1*1=7, a(22)=2*3^1+2*1=8,
a(23)=2*4^1+3*1=11, a(24)=2*5^1+4*1=14, a(25)=2*6^1+5*1=17,
a(26)=2*7^1+6*1=20, a(27)=2*8^1+7*1=23, a(28)=2*9^1+8*1=26,
a(29)=2*10^1+9*1=29, a(30)=3*4^1+0*1=12, a(31)=3*4^1+1*1=13.
		

Crossrefs

Cf. A031298.

Programs

  • Haskell
    a068505 n = foldr (\d v -> v * b + d) 0 dds where
    b = maximum dds + 1
    dds = a031298_row n
    -- Reinhard Zumkeller, Feb 17 2013, Dec 29 2011
    
  • Maple
    f:= proc(n) local b,L,i;
    L:= convert(n,base,10);
    b:= max(L);
    add(L[i]*(b+1)^(i-1),i=1..nops(L));
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 02 2016
  • Mathematica
    a[n_] := (id = IntegerDigits[n] // Reverse; b = Max[id]+1; id.b^Range[0, Length[id]-1]); Table[a[n], {n, 1, 75}] (* Jean-François Alcover, May 15 2013 *)
    Table[FromDigits[IntegerDigits[n],Max[IntegerDigits[n]+1]],{n,80}] (* Harvey P. Dale, Dec 02 2015 *)
  • PARI
    a(n)=my(d = digits(n), b = vecmax(d)); subst(Pol(d), x, b+1); \\ Michel Marcus, Feb 12 2016

Extensions

Definition clarified and comment corrected by Martin Büttner, Feb 02 2016

A354760 a(0) = 0; for n >= 1, a(n) = a(n - A054055(n)) + 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13
Offset: 0

Views

Author

Ctibor O. Zizka, Jun 06 2022

Keywords

Comments

Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - A054055(k). a(n) ~ n/ln(n).

Examples

			n = 12, a(12) = 1 + a(12 - A054055(12)) = 1 + a(10) = 1 + 1 + a(10 - A054055(10)) = 2 + a(9) = 2 + 1 + a(9 - A054055(9)) = 2 + 1 + 0 = 3.
		

Crossrefs

Cf. A054055.

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = a[n - Max[IntegerDigits[n]]] + 1; Array[a, 100, 0] (* Amiram Eldar, Jun 06 2022 *)

A007088 The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111
Offset: 0

Views

Author

Keywords

Comments

List of binary numbers. (This comment is to assist people searching for that particular phrase. - N. J. A. Sloane, Apr 08 2016)
Or, numbers that are sums of distinct powers of 10.
Or, numbers having only digits 0 and 1 in their decimal representation.
Complement of A136399; A064770(a(n)) = a(n). - Reinhard Zumkeller, Dec 30 2007
From Rick L. Shepherd, Jun 25 2009: (Start)
Nonnegative integers with no decimal digit > 1.
Thus nonnegative integers n in base 10 such that kn can be calculated by normal addition (i.e., n + n + ... + n, with k n's (but not necessarily k + k + ... + k, with n k's)) or multiplication without requiring any carry operations for 0 <= k <= 9. (End)
For n > 1: A257773(a(n)) = 10, numbers that are Belgian-k for k=0..9. - Reinhard Zumkeller, May 08 2015
For any integer n>=0, find the binary representation and then interpret as decimal representation giving a(n). - Michael Somos, Nov 15 2015
N is in this sequence iff A007953(N) = A101337(N). A028897 is a left inverse. - M. F. Hasler, Nov 18 2019
For n > 0, numbers whose largest decimal digit is 1. - Stefano Spezia, Nov 15 2023

Examples

			a(6)=110 because (1/2)*((1-(-1)^6)*10^0 + (1-(-1)^3)*10^1 + (1-(-1)^1)*10^2) = 10 + 100.
G.f. = x + 10*x^2 + 11*x^3 + 100*x^4 + 101*x^5 + 110*x^6 + 111*x^7 + 1000*x^8 + ...
.
  000    The numbers < 2^n can be regarded as vectors with
  001    a fixed length n if padded with zeros on the left
  010    side. This represents the n-fold Cartesian product
  011    over the set {0, 1}. In the example on the left,
  100    n = 3. (See also the second Python program.)
  101    Binary vectors in this format can also be seen as a
  110    representation of the subsets of a set with n elements.
  111    - _Peter Luschny_, Jan 22 2024
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 21.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §2.8 Binary, Octal, Hexadecimal, p. 64.
  • Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991, p. 383.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

The basic sequences concerning the binary expansion of n are this one, A000120 (Hammingweight: sum of bits), A000788 (partial sums of A000120), A000069 (A000120 is odd), A001969 (A000120 is even), A023416 (number of bits 0), A059015 (partial sums). Bisections A099820 and A099821.
Cf. A028897 (convert binary to decimal).

Programs

  • Haskell
    a007088 0 = 0
    a007088 n = 10 * a007088 n' + m where (n',m) = divMod n 2
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    A007088 := n-> convert(n, binary): seq(A007088(n), n=0..50); # R. J. Mathar, Aug 11 2009
  • Mathematica
    Table[ FromDigits[ IntegerDigits[n, 2]], {n, 0, 39}]
    Table[Sum[ (Floor[( Mod[f/2 ^n, 2])])*(10^n) , {n, 0, Floor[Log[2, f]]}], {f, 1, 100}] (* José de Jesús Camacho Medina, Jul 24 2014 *)
    FromDigits/@Tuples[{1,0},6]//Sort (* Harvey P. Dale, Aug 10 2017 *)
  • PARI
    {a(n) = subst( Pol( binary(n)), x, 10)}; /* Michael Somos, Jun 07 2002 */
    
  • PARI
    {a(n) = if( n<=0, 0, n%2 + 10*a(n\2))}; /* Michael Somos, Jun 07 2002 */
    
  • PARI
    a(n)=fromdigits(binary(n),10) \\ Charles R Greathouse IV, Apr 08 2015
    
  • Python
    def a(n): return int(bin(n)[2:])
    print([a(n) for n in range(40)]) # Michael S. Branicky, Jan 10 2021
    
  • Python
    from itertools import product
    n = 4
    for p in product([0, 1], repeat=n): print(''.join(str(x) for x in p))
    # Peter Luschny, Jan 22 2024

Formula

a(n) = Sum_{i=0..m} d(i)*10^i, where Sum_{i=0..m} d(i)*2^i is the base 2 representation of n.
a(n) = (1/2)*Sum_{i>=0} (1-(-1)^floor(n/2^i))*10^i. - Benoit Cloitre, Nov 20 2001
a(n) = A097256(n)/9.
a(2n) = 10*a(n), a(2n+1) = a(2n)+1.
G.f.: 1/(1-x) * Sum_{k>=0} 10^k * x^(2^k)/(1+x^(2^k)) - for sequence as decimal integers. - Franklin T. Adams-Watters, Jun 16 2006
a(A000290(n)) = A001737(n). - Reinhard Zumkeller, Apr 25 2009
a(n) = Sum_{k>=0} A030308(n,k)*10^k. - Philippe Deléham, Oct 19 2011
For n > 0: A054055(a(n)) = 1. - Reinhard Zumkeller, Apr 25 2012
a(n) = Sum_{k=0..floor(log_2(n))} floor((Mod(n/2^k, 2)))*(10^k). - José de Jesús Camacho Medina, Jul 24 2014

A054054 Smallest digit of n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Apr 29 2000

Keywords

Comments

a(n) = 0 for almost all n. - Charles R Greathouse IV, Oct 02 2013
More precisely, a(n) = 0 asymptotically almost surely, i.e., except for a set of density 0: As the number of digits of n grows, the probability of having no zero digit goes to zero as 0.9^(length of n), although there are infinitely many counterexamples. - M. F. Hasler, Oct 11 2015

Examples

			a(12) = 1 because 1 < 2.
		

Crossrefs

Programs

  • Haskell
    a054054 = f 9 where
       f m x | x <= 9 = min m x
             | otherwise = f (min m d) x' where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Jun 20 2012, Apr 25 2012
    
  • Maple
    seq(min(convert(n,base,10)),n=0..100); # Robert Israel, Jul 07 2016
  • Mathematica
    A054054[n_]:=Min[IntegerDigits[n]]
  • PARI
    A054054(n)=if(n,vecmin(digits(n)))  \\ or: Set(digits(n))[1]. - M. F. Hasler, Jan 23 2013

Formula

a(A011540(n)) = 0; a(A052382(n)) > 0. - Reinhard Zumkeller, Apr 25 2012
a(n) = A262188(n,0). - Reinhard Zumkeller, Sep 14 2015
a(n) = 0 iff A007954(n) = 0. - M. F. Hasler, Oct 11 2015
a(n) = 9 - A054055(A061601(n)). - Robert Israel, Jul 07 2016

Extensions

Edited by M. F. Hasler, Oct 11 2015

A037904 Greatest digit of n - least digit of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = A054055(n)-A054054(n); a(A010785(n)) = 0; for k>0: a(n) = a(n*10^k + A000030(n)) = a(n*10^k + A010879(n)) = a(n*10^k + A054054(n)) = a(n*10^k + A054055(n)) . - Reinhard Zumkeller, Dec 14 2007; corrected by David Wasserman, May 21 2008

Crossrefs

Programs

  • Haskell
    a037904 = f 9 0 where
       f u v 0 = v - u
       f u v z = f (min u d) (max v d) z' where (z', d) = divMod z 10
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Maple
    f:= n -> (max-min)(convert(n,base,10)):
    map(f, [$1..1000]); # Robert Israel, Jul 07 2016
  • Mathematica
    f[n_] := Block[{d = IntegerDigits[n]}, Max[d] - Min[d]]; Table[ f[n], {n, 1, 15}]
  • PARI
    a(n)=my(d=digits(n)); vecmax(d)-vecmin(d) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    def A037904(n): return int(max(s:=str(n)))-int(min(s)) # Chai Wah Wu, Nov 10 2023

Extensions

Incorrect comments deleted by Robert Israel, Jul 07 2016

A083890 Number of divisors of n with largest digit = 3 (base 10).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 2, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 1, 1, 2, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 1, 1, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=132, 3 of the 12 divisors of 132 have largest digit =3: {3,33,132}, therefore a(132)=3.
		

Crossrefs

Programs

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083891(n) - A083892(n) - A083893(n) - A083894(n) - A083895(n) - A083896(n) = A083898(n) - A083897(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A277965(k) = 0.84217457724798904648... . - Amiram Eldar, Jan 04 2024

A083891 Number of divisors of n with largest digit = 4 (base 10).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 2, 1, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=120, 3 of the 16 divisors of 120 have largest digit=4: {4,24,40}, therefore a(120)=3.
		

Crossrefs

Programs

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083892(n) - A083893(n) - A083894(n) - A083895(n) - A083896(n) = A083899(n) - A083898(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A277966(k) = 0.98827280431174433126... . - Amiram Eldar, Jan 04 2024

A083892 Number of divisors of n with largest digit = 5 (base 10).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=125, 3 of the 4 divisors of 125 have largest digit =5: {5,25,125}, therefore a(125)=3.
		

Crossrefs

Programs

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083891(n) - A083893(n) - A083894(n) - A083895(n) - A083896(n) = A083900(n) - A083899(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A283608(k) = 1.32926350368137107677... . - Amiram Eldar, Jan 04 2024

A083893 Number of divisors of n with largest digit = 6 (base 10).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 1, 2, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=240, 3 of the 20 divisors of 240 have largest digit =6: {6,16,60}, therefore a(240)=3.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(n) | Max(Intseq(d)) eq 6]: n in [1..150]]; // Marius A. Burtea, Oct 06 2019
  • Maple
    f:= proc(n) nops(select(t -> max(convert(t, base, 10))=d, numtheory:-divisors(n))) end proc:
    d:= 6:
    map(f, [$1..200]); # Robert Israel, Oct 06 2019
  • Mathematica
    With[{k = 6}, Array[DivisorSum[#, 1 &, And[#[[k]] > 0, Total@ #[[k + 1 ;; 9]] == 0] &@ DigitCount[#] &] &, 105]] (* Michael De Vlieger, Oct 06 2019 *)

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083891(n) - A083892(n) - A083894(n) - A083895(n) - A083896(n) = A083901(n) - A083900(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A283609(k) = 2.06890539387954414920... . - Amiram Eldar, Jan 04 2024

A083894 Number of divisors of n with largest digit = 7 (base 10).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 2, 1, 1, 1, 2, 1, 1, 2, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 08 2003

Keywords

Examples

			n=119, 2 of the 4 divisors of 119 have largest digit =7: {7,17}, therefore a(119)=2.
		

Crossrefs

Programs

Formula

a(n) = A000005(n) - A083888(n) - A083889(n) - A083890(n) - A083891(n) - A083892(n) - A083893(n) - A083895(n) - A083896(n) = A083902(n) - A083901(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A283610(k) = 3.96819589328234218540... . - Amiram Eldar, Jan 04 2024
Showing 1-10 of 110 results. Next