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.
%I A061601 #51 Dec 06 2024 21:43:58 %S A061601 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, %T A061601 73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51, %U A061601 50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28 %N 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. %C A061601 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 %C A061601 If n is divisible by 3, so is a(n). The same goes for 9. - _Alonso del Arte_, Dec 01 2011 %C A061601 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 %D A061601 Kjartan Poskitt, Murderous Maths: Numbers, The Key to the Universe, Scholastic Ltd, 2002. See p 159. %H A061601 Indranil Ghosh, <a href="/A061601/b061601.txt">Table of n, a(n) for n = 0..25000</a> (terms 0..1000 from Harry J. Smith) %F A061601 a(n) = if n<10 then 9 - n else 10*a([n/10]) + 9 - n mod 10. - _Reinhard Zumkeller_, Jan 20 2010 %F A061601 a(n) <= 9n - 1. - _Charles R Greathouse IV_, Nov 15 2022 %e A061601 a(7) = 2 = 10 - 1 -7. a(123) = 1000 -1 -123 = 876. %p A061601 A061601 := proc(n) %p A061601 10^A055642(n)-1-n ; %p A061601 end proc: # _R. J. Mathar_, Nov 30 2011 %t A061601 nineComplement[n_] := FromDigits[Table[9, {Length[IntegerDigits[n]]}] - IntegerDigits[n]]; Table[nineComplement[n], {n, 0, 71}] (* _Alonso del Arte_, Nov 30 2011 *) %o A061601 (PARI) A061601(n)=my(e=length(Str(n)));10^e-1 - n; \\ _Joerg Arndt_, Aug 28 2013 %o A061601 (Haskell) %o A061601 a061601 n = if n <= 9 then 9 - n else 10 * ad n' + 9 - d %o A061601 where (n',d) = divMod n 10 %o A061601 -- _Reinhard Zumkeller_, Feb 21 2014, Oct 04 2011 %o A061601 (Python) %o A061601 def A061601(n): %o A061601 return 10**len(str(n))-1-n # _Indranil Ghosh_, Jan 30 2017 %Y A061601 Cf. A035327, A171960. %Y A061601 Cf. A055120. %Y A061601 See A267193 for complement obverse of n. %K A061601 nonn,base,easy %O A061601 0,1 %A A061601 _Amarnath Murthy_, May 19 2001 %E A061601 Corrected and extended by _Matthew Conroy_, Jan 19 2002