login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 11
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 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

Also anti-nine numbers. - Cino Hilliard (hillcino368(AT)gmail.com), Mar 11 2006

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). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), May 28 2010]

If n is divisible by 3, so is a(n). The same goes for 9. - Alonso del Arte, Dec 01 2011

REFERENCES

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

LINKS

Harry J. Smith, Table of n, a(n) for n=0,...,1000

Matthew M. Conroy, Home page (listed instead of email address)

FORMULA

a(n) = if n<10 then 9 - n else 10*a([n/10]) + 9 - n mod 10. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jan 20 2010]

EXAMPLE

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

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 *)

PROG

(PARI) g(n) = for(x=0, n, ln=length(Str(x)); y=10^ln-1 - x; print1(y", ")) \\ Cino Hilliard (hillcino368(AT)gmail.com), Mar 11 2006

(PARI) { for (n=0, 1000, ln=length(Str(n)); write("b061601.txt", n, " ", 10^ln - 1 - n) ) } \\ From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jul 25 2009

(Haskell)

a061601 0 = 9

a061601 n = foldl f 0 $ reverse $ unfoldr g n where

   f v d = 10 * v + 9 - d

   g x = if x == 0 then Nothing else Just $ swap $ divMod x 10

-- Reinhard Zumkeller, Oct 04 2011

CROSSREFS

Cf. A035327, A171960.

Cf. A055120.

Sequence in context: A023451 A109910 A084019 * A098756 A112454 A138531

Adjacent sequences:  A061598 A061599 A061600 * A061602 A061603 A061604

KEYWORD

nonn,base,easy

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 19 2001

EXTENSIONS

Corrected and extended by Matthew M. Conroy, Jan 19 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 18:09 EST 2012. Contains 205663 sequences.