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

A051885 Smallest number whose sum of digits is n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 19999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 199999, 299999, 399999, 499999
Offset: 0

Views

Author

Felice Russo, Dec 15 1999

Keywords

Comments

This is also the list of lunar triangular numbers: A087052 with duplicates removed. - N. J. A. Sloane, Jan 25 2011
Numbers n such that A061486(n) = n. - Amarnath Murthy, May 06 2001
The product of digits incremented by 1 is the same as the number incremented by 1. If a(n) = abcd...(a,b,c,d, etc. are digits of a(n)) {a(n) + 1} = (a+1)*(b+1)(c+1)*(d+1)*..., e.g., 299 + 1 = (2+1)*(9+1)*(9+1) = 300. - Amarnath Murthy, Jul 29 2003
A138471(a(n)) = 0. - Reinhard Zumkeller, Mar 19 2008
a(n+1) = A108971(A179988(n)). - Reinhard Zumkeller, Aug 09 2010, Jul 10 2011
Positions of records in A003132: A080151(n) = A003132(a(n)). - Reinhard Zumkeller, Jul 10 2011
a(n) = A242614(n,1). - Reinhard Zumkeller, Jul 16 2014
A254524(a(n)) = 1. - Reinhard Zumkeller, Oct 09 2015
The slowest strictly increasing sequence of nonnegative integers such that, for any two terms, calculating the difference of their decimal representations requires no borrowing. - Rick L. Shepherd, Aug 11 2017

Crossrefs

Numbers of form i*b^j-1 (i=1..b-1, j >= 0) for bases b = 2 through 9: A000225, A062318, A180516, A181287, A181288, A181303, A165804, A140576. - N. J. A. Sloane, Jan 25 2011
Cf. A002283.
Cf. A254524.

Programs

  • Haskell
    a051885 n = (m + 1) * 10^n' - 1 where (n',m) = divMod n 9
    -- Reinhard Zumkeller, Jul 10 2011
    
  • Magma
    [i*10^j-1: i in [1..9], j in [0..5]];
    
  • Maple
    b:=10; t1:=[]; for j from 0 to 15 do for i from 1 to b-1 do t1:=[op(t1), i*b^j-1]; od: od: t1; # N. J. A. Sloane, Jan 25 2011
  • Mathematica
    a[n_] := (Mod[n, 9] + 1)*10^Floor[n/9] - 1; Table[a[n], {n, 0, 49}](* Jean-François Alcover, Dec 01 2011, after Henry Bottomley *)
  • PARI
    A051885(n) = (n%9+1)*10^(n\9)-1  \\ M. F. Hasler, Jun 17 2012
    
  • PARI
    first(n) = Vec(x*(x^2 + x + 1)*(x^6 + x^3 + 1)/((x - 1)*(10*x^9 - 1)) + O(x^n), -n) \\ Iain Fox, Dec 30 2017
    
  • Python
    def A051885(n): return ((n % 9)+1)*10**(n//9)-1 # Chai Wah Wu, Apr 04 2021

Formula

These are the numbers i*10^j-1 (i=1..9, j >= 0). - N. J. A. Sloane, Jan 25 2011
a(n) = ((n mod 9) + 1)*10^floor(n/9) - 1 = a(n-1) + 10^floor((n-1)/9). - Henry Bottomley, Apr 24 2001
a(n) = A037124(n+1) - 1. - Reinhard Zumkeller, Jan 03 2008, Jul 10 2011
G.f.: x*(x^2+x+1)*(x^6+x^3+1) / ((x-1)*(10*x^9-1)). - Colin Barker, Feb 01 2013

Extensions

More terms from James Sellers, Dec 16 1999
Offset fixed by Reinhard Zumkeller, Jul 10 2011

A343045 a(0) = 0 and for any n > 0, a(n) = A343044(a(n-1), n).

Original entry on oeis.org

0, 1, 3, 3, 5, 5, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 89, 89, 89, 89, 89, 89, 89
Offset: 0

Views

Author

Rémy Sigrist, Apr 05 2021

Keywords

Comments

This sequence has similarities with A087052 and A343041.
If we remove duplicate terms, then we obtain A343048.

Examples

			The first terms, in decimal and in primorial base, are:
  n   a(n)  prim(n)  prim(a(n))
  --  ----  -------  ----------
   0     0        0           0
   1     1        1           1
   2     3       10          11
   3     3       11          11
   4     5       20          21
   5     5       21          21
   6    11      100         121
   7    11      101         121
   8    11      110         121
   9    11      111         121
  10    11      120         121
  11    11      121         121
  12    17      200         221
  13    17      201         221
  14    17      210         221
		

Crossrefs

Programs

  • PARI
    See Links section.

A087121 Take bounded lunar divisors of n as defined in A087028, add them using lunar addition. See A087082 for their conventional sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 199, 109, 109, 109, 109, 109, 109, 109, 109, 109, 199, 199
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 21 2003

Keywords

Comments

Differs from A087052 after 100 terms.

Crossrefs

A342766 a(1) = 1, for any n > 1, a(n) = A342765(a(n-1), n).

Original entry on oeis.org

1, 2, 3, 6, 10, 10, 14, 28, 42, 42, 66, 66, 78, 78, 78, 156, 204, 204, 228, 228, 228, 228, 276, 276, 460, 460, 690, 690, 870, 870, 930, 1860, 1860, 1860, 1860, 1860, 2220, 2220, 2220, 2220, 2460, 2460, 2580, 2580, 2580, 2580, 2820, 2820, 3948, 3948, 3948, 3948
Offset: 1

Views

Author

Rémy Sigrist, Apr 02 2021

Keywords

Comments

This sequence has similarities with A087052.
This sequence is nondecreasing.
A new value is introduced at each power of prime (A000961).
The ordinal transform of the sequence is A276781.
The RUNS transform of the sequence is A057820.

Examples

			The first terms, alongside their prime factorizations, are:
  n   a(n)  n          a(n)
  --  ----  ---------  ----------
   1     1          1           1
   2     2          2           2
   3     3          3           3
   4     6      2 * 2       2 * 3
   5    10          5       2 * 5
   6    10      2 * 3       2 * 5
   7    14          7       2 * 7
   8    28  2 * 2 * 2   2 * 2 * 7
   9    42      3 * 3   2 * 3 * 7
  10    42      2 * 5   2 * 3 * 7
  11    66         11   2 * 3 * 11
  12    66  2 * 2 * 3   2 * 3 * 11
		

Crossrefs

Programs

  • PARI
    See Links section.

A343041 a(0) = 0 and for any n > 0, a(n) = A343040(a(n-1), n).

Original entry on oeis.org

0, 1, 3, 3, 5, 5, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 23, 23, 23, 23, 23, 23, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71
Offset: 0

Views

Author

Rémy Sigrist, Apr 03 2021

Keywords

Comments

This sequence has similarities with A087052.
If we remove duplicate terms, then we obtain A200748.
The value A200748(k) appears A130493(k) times for any k > 0.

Examples

			The first terms, in decimal and in factorial base, are:
  n   a(n)  fact(n)  fact(a(n))
  --  ----  -------  ----------
   0     0        0           0
   1     1        1           1
   2     3       10          11
   3     3       11          11
   4     5       20          21
   5     5       21          21
   6    11      100         121
   7    11      101         121
   8    11      110         121
   9    11      111         121
  10    11      120         121
  11    11      121         121
  12    17      200         221
  13    17      201         221
  14    17      210         221
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-5 of 5 results.