login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A010878
a(n) = n mod 9.
34
0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5
OFFSET
0,3
COMMENTS
Periodic with period of length 9. The digital root of n (A010888) is a very similar sequence.
The rightmost digit in the base-9 representation of n. Also, the equivalent value of the two rightmost digits in the base-3 representation of n. - Hieronymus Fischer, Jun 11 2007
FORMULA
Complex representation: a(n)=(1/9)*(1-r^n)*sum{1<=k<9, k*product{1<=m<9,m<>k, (1-r^(n-m))}} where r=exp(2*pi/9*i) and i=sqrt(-1). Trigonometric representation: a(n)=(256/9)^2*(sin(n*pi/9))^2*sum{1<=k<9, k*product{1<=m<9,m<>k, (sin((n-m)*pi/9))^2}}. G.f.: g(x)=(sum{1<=k<9, k*x^k})/(1-x^9). Also: g(x)=x(8x^9-9x^8+1)/((1-x^9)(1-x)^2). - Hieronymus Fischer, May 31 2007
a(n) = n mod 3 + 3*(floor(n/3)mod 3) = A010872(n) + 3*A010872(A002264(n)). - Hieronymus Fischer, Jun 11 2007
a(n) = floor(12345678/999999999*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = floor(1513361/96855122*9^(n+1)) mod 9. - Hieronymus Fischer, Jan 04 2013
MAPLE
A010878 := proc(n)
modp(n, 9) ;
end proc:
seq(A010878(n), n=0..100) ; # R. J. Mathar, Sep 09 2015
MATHEMATICA
Array[Mod[#, 9]&, 105, 0] (* Jean-François Alcover, Jan 30 2018 *)
PadRight[{}, 120, Range[0, 8]] (* Harvey P. Dale, Dec 19 2018 *)
PROG
(Haskell)
a010878 = (`mod` 9)
a010878_list = cycle [0..8] -- Reinhard Zumkeller, Jan 09 2013
(PARI) a(n)=n%9 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
Partial sums: A130487. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486.
Sequence in context: A207505 A235049 A031087 * A309788 A326746 A257849
KEYWORD
nonn,easy
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy