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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010888 Digital root of n (repeatedly add the digits of n until a single digit is reached). 161
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

This is sometimes also called the additive digital root of n.

n mod 9 (A010878) is a very similar sequence.

Partial sums are given by A130487(n-1)+n (for n>0). - Hieronymus Fischer, Jun 08 2007

Decimal expansion of 13717421/111111111 is 0.123456789123456789123456789... with period 9. - Eric Desbiaux, May 19 2008

a(A005117(n)) < 9. - Reinhard Zumkeller, Mar 30 2010

My friend Jahangeer Kholdi has found that 19 is the smallest prime p such that for each number n, a(p*n)=a(n). In fact we have : a(m*n)=a(a(m)*a(n)) so all numbers with digital root 1 (numbers of the form 9k+1) has this property. See comment lines of A017173. Also we have a(m+n)=a(a(m)+a(n)). - Farideh Firoozbakht, Jul 23 2010

REFERENCES

Martin Gardner, Mathematics, Magic and Mystery, 1956.

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 0..10000

Eric Weisstein's World of Mathematics, Digitaddition

Eric Weisstein's World of Mathematics, Digital Root

Wikipedia, Vedic square

Index entries for Colombian or self numbers and related sequences

FORMULA

If n=0 then a(n) = 0; otherwise a(n) = (n reduced mod 9), but if the answer is 0 change it to 9.

Equivalently, if n=0 then a(n) = 0, otherwise a(n) = (n-1 reduced mod 9) + 1.

If the initial 0 term is ignored, the sequence is periodic with period 9.

a(n) = A010878(n-1)+1 (for n>0). G.f.: g(x)=(x*sum{0<=k<9, (k+1)*x^k})/(1-x^9). Also: g(x)=x(9x^10-10x^9+1)/((1-x^9)(1-x)^2). - Hieronymus Fischer, Jun 08 2007

a(n) = 1+[(n+8) mod 9]-9*{1-[((n+1)!+1) mod (n+1)]}, with n>=0. a(n) = 1+[(n+8) mod 9]-9*A000007. - Paolo P. Lava, Jun 20 2007

EXAMPLE

37 -> 10 -> 1, so a(37)=1.

MAPLE

f:=n->if n=0 then 0 else ((n-1) mod 9) + 1; fi; # N. J. A. Sloane, Feb 20 2013

P:=proc(n) local a, i; for i from 0 by 1 to n do a:=1+((i+8) mod 9)-9*(1-(((i+1)!+1) mod (i+1))); print(a); od; end: P(100); # Paolo P. Lava, Jun 20 2007

MATHEMATICA

Join[{0}, Array[Mod[ # - 1, 9] + 1 &, 104]] (* Robert G. Wilson v, Jan 04 2006 *)

PROG

(PARI) A010888(n)=if(n, (n-1)%9+1) \\ M. F. Hasler, Jan 04 2011

(Haskell)

a010888 = until (< 10) a007953

-- Reinhard Zumkeller, Oct 17 2011, May 12 2011

(Python)

def A010888(n):

....return 1+ (n-1) % 9 # Chai Wah Wu, Aug 23 2014

CROSSREFS

Cf. A007953, A007954, A031347, A113217, A113218, A010878 (n mod 9), A010872, A010873, A010874, A010875, A010876, A010877, A010879, A004526, A002264, A002265, A002266, A017173, A031286 (additive persistence of n), (multiplicative digital root of n), A031346 (multiplicative persistence of n).

Sequence in context: A037265 A053837 A128244 * A177274 A131650 A033930

Adjacent sequences:  A010885 A010886 A010887 * A010889 A010890 A010891

KEYWORD

nonn,easy,nice,base

AUTHOR

N. J. A. Sloane.

STATUS

approved

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

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

Last modified October 24 20:16 EDT 2014. Contains 248516 sequences.