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.

A061601 9's complement of n: a(n) = 10^d - 1 - n where d is the number of digits in n. If a is a digit in n replace it with 9 - a.

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28
Offset: 0

Views

Author

Amarnath Murthy, May 19 2001

Keywords

Comments

A109002 and A178500 give record values and where they occur: A109002(n+1)=a(A178500(n)) and a(m)<A109002(n+1) for m<A178500(n). - Reinhard Zumkeller, May 28 2010
If n is divisible by 3, so is a(n). The same goes for 9. - Alonso del Arte, Dec 01 2011
For n > 0, a(n-1) consists of the A055642(n) least significant digits of the 10-adic integer -n. - Stefano Spezia, Jan 21 2021

Examples

			a(7) = 2 = 10 - 1 -7. a(123) = 1000 -1 -123 = 876.
		

References

  • Kjartan Poskitt, Murderous Maths: Numbers, The Key to the Universe, Scholastic Ltd, 2002. See p 159.

Crossrefs

Cf. A055120.
See A267193 for complement obverse of n.

Programs

  • Haskell
    a061601 n = if n <= 9 then 9 - n else 10 * ad n' + 9 - d
                where (n',d) = divMod n 10
    -- Reinhard Zumkeller, Feb 21 2014, Oct 04 2011
    
  • Maple
    A061601 := proc(n)
            10^A055642(n)-1-n ;
    end proc: # R. J. Mathar, Nov 30 2011
  • Mathematica
    nineComplement[n_] := FromDigits[Table[9, {Length[IntegerDigits[n]]}] - IntegerDigits[n]]; Table[nineComplement[n], {n, 0, 71}] (* Alonso del Arte, Nov 30 2011 *)
  • PARI
    A061601(n)=my(e=length(Str(n)));10^e-1 - n; \\ Joerg Arndt, Aug 28 2013
    
  • Python
    def A061601(n):
        return 10**len(str(n))-1-n # Indranil Ghosh, Jan 30 2017

Formula

a(n) = if n<10 then 9 - n else 10*a([n/10]) + 9 - n mod 10. - Reinhard Zumkeller, Jan 20 2010
a(n) <= 9n - 1. - Charles R Greathouse IV, Nov 15 2022

Extensions

Corrected and extended by Matthew Conroy, Jan 19 2002

A178500 a(n) = 10^n * signum(n).

Original entry on oeis.org

0, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000, 10000000000000000000, 100000000000000000000
Offset: 0

Views

Author

Reinhard Zumkeller, May 28 2010

Keywords

Comments

a(n-1) is the minimum difference between an n-digit number (written in base 10, nonzero leading digit) and the product of its digits. For n > 1, it is also a number meeting that bound. See A070565. - Devin Akman, Apr 17 2019

Crossrefs

Programs

Formula

a(n) = A011557(n)*A057427(n).
For n > 0, a(n) = A011557(n).
a(n) = 10*A178501(n).
a(n) = A000533(n) - 1.
A061601(a(n)) = A109002(n+1).
From Elmo R. Oliveira, Jul 21 2025: (Start)
G.f.: 10*x/(1-10*x).
E.g.f.: 2*exp(5*x)*sinh(5*x).
a(n) = 10*a(n-1) for n > 1. (End)

A198698 a(n) = 3*10^n - 1.

Original entry on oeis.org

2, 29, 299, 2999, 29999, 299999, 2999999, 29999999, 299999999, 2999999999, 29999999999, 299999999999, 2999999999999, 29999999999999, 299999999999999, 2999999999999999, 29999999999999999, 299999999999999999, 2999999999999999999, 29999999999999999999, 299999999999999999999
Offset: 0

Views

Author

Vincenzo Librandi, Oct 29 2011

Keywords

Crossrefs

Programs

  • Magma
    [3*10^n-1: n in [0..30]];

Formula

a(n) = 10*a(n-1) + 9, a(0)=2.
a(n) = 11*a(n-1) - 10*a(n-2), n>1.
G.f.: (2+7*x)/((10*x-1)*(x-1)). - R. J. Mathar, Oct 30 2011
E.g.f.: exp(x)*(3*exp(9*x) - 1). - Elmo R. Oliveira, Jun 13 2025

A198699 a(n) = 7*10^n - 1.

Original entry on oeis.org

6, 69, 699, 6999, 69999, 699999, 6999999, 69999999, 699999999, 6999999999, 69999999999, 699999999999, 6999999999999, 69999999999999, 699999999999999, 6999999999999999, 69999999999999999, 699999999999999999, 6999999999999999999, 69999999999999999999, 699999999999999999999
Offset: 0

Views

Author

Vincenzo Librandi, Oct 29 2011

Keywords

Crossrefs

Programs

  • Magma
    [7*10^n-1: n in [0..30]];
  • Mathematica
    NestList[10#+9&,6,20] (* or *) LinearRecurrence[{11,-10},{6,69},20] (* Harvey P. Dale, Dec 29 2013 *)

Formula

a(n) = 10*a(n-1) + 9.
a(n) = 11*a(n-1) - 10*a(n-2), n>1.
G.f.: (6+3*x)/((10*x-1)*(x-1)). - R. J. Mathar, Oct 29 2011
From Elmo R. Oliveira, Jun 14 2025: (Start)
E.g.f.: exp(x)*(7*exp(9*x) - 1).
a(n) = 3*A198972(n). (End)

A198700 a(n) = 11*10^n - 1.

Original entry on oeis.org

10, 109, 1099, 10999, 109999, 1099999, 10999999, 109999999, 1099999999, 10999999999, 109999999999, 1099999999999, 10999999999999, 109999999999999, 1099999999999999, 10999999999999999, 109999999999999999, 1099999999999999999, 10999999999999999999, 109999999999999999999
Offset: 0

Views

Author

Vincenzo Librandi, Oct 29 2011

Keywords

Crossrefs

Cf. A096209 (primes).

Programs

  • Magma
    [11*10^n-1: n in [0..30]];
  • Mathematica
    (11 10^Range[0,20])-1 (* or  *) LinearRecurrence[{11,-10},{10,109},20] (* Harvey P. Dale, Nov 29 2020 *)

Formula

a(n) = 10*a(n-1) + 9.
a(n) = 11*a(n-1) - 10*a(n-2) for n > 1.
G.f.: (10-x)/((10*x-1)*(x-1)). - R. J. Mathar, Oct 29 2011
E.g.f.: exp(x)*(11*exp(9*x) - 1). - Elmo R. Oliveira, Aug 23 2024

A093948 Primes of the form 9*10^k - 1.

Original entry on oeis.org

89, 8999, 89999999, 89999999999999999999, 899999999999999999999999999999, 89999999999999999999999999999999999999, 8999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Rick L. Shepherd, Apr 17 2004

Keywords

Comments

Equivalently, primes of the form 8*10^k + 9*R_k, where R_k is the repunit (A002275) of length k.

Crossrefs

Cf. A002275, A056725 (corresponding k).
Primes in A109002.

Formula

a(n) = 9*10^A056725(n) - 1 = A109002(A056725(n) + 1). - Elmo R. Oliveira, Jun 14 2025
Showing 1-6 of 6 results.