login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171181 n followed by (n - sum of digits of n). 4
0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 9, 11, 9, 12, 9, 13, 9, 14, 9, 15, 9, 16, 9, 17, 9, 18, 9, 19, 9, 20, 18, 21, 18, 22, 18, 23, 18, 24, 18, 25, 18, 26, 18, 27, 18, 28, 18, 29, 18, 30, 27, 31, 27, 32, 27, 33, 27, 34, 27, 35, 27, 36, 27, 37, 27, 38, 27, 39, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Harvey P. Dale, Table of n, a(n) for n = 0..1000

FORMULA

If n is even, a(n) = n/2; if n is odd, a(n) = A066568(floor(n/2)). - Michel Marcus, Aug 14 2013

EXAMPLE

a(0) = 0, a(1) = 0 - 0 = 0.

a(2) = 1, a(3) = 1 - 1 = 0.

a(4) = 2, a(5) = 2 - 2 = 0.

a(6) = 3, a(7) = 3 - 3 = 0.

MATHEMATICA

Table[{n, n-Total[IntegerDigits[n]]}, {n, 0, 40}]//Flatten (* Harvey P. Dale, Nov 26 2016 *)

PROG

(PARI) a(n) = if (n % 2 == 0, n/2, nn = n\2; d = digits(nn); nn - sum(i=1, #d, d[i]); ); \\ Michel Marcus, Aug 14 2013

CROSSREFS

Interspersion of A001477 and A066568.

Sequence in context: A027656 A142150 A276457 * A309261 A326834 A034948

Adjacent sequences:  A171178 A171179 A171180 * A171182 A171183 A171184

KEYWORD

easy,nonn,base

AUTHOR

Marcel Hetkowski Fabeny (marcelfabeny(AT)yahoo.com.br), Dec 04 2009

EXTENSIONS

Edited by N. J. A. Sloane, Dec 05 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 25 22:37 EST 2021. Contains 341618 sequences. (Running on oeis4.)