The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A029898 Pitoun's sequence: a(n+1) is digital root of a(0) + ... + a(n). 18
1, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
If the initial 1 is omitted, this is 2^n mod 9. - N. J. A. Sloane
From Cino Hilliard, Dec 31 2004: (Start)
Except for the initial term, also the digital root of 11^n.
Except for the initial term, also the decimal expansion of 125/1001.
Except for the initial term, also the digital root of 2^n. (End)
Aside from the first term, periodic with period 6. - Charles R Greathouse IV, Nov 29 2011
LINKS
FORMULA
a(n) = digital root of 2^(n-1) in base 10 = 2^(n-1) (mod 9). - Olivier Gérard, Jun 06 2001
For n > 0: a(n+6) = a(n) and a(n) = A007612(n+1) - A007612(n) = A010888(A007612(n)). - Reinhard Zumkeller, Feb 27 2006
a(n) = (9 + cos(n*Pi) - 4*sqrt(3)*sin(n*Pi/3))/2 for n > 0 with a(0)=1. - Wesley Ivan Hurt, Oct 04 2018
From Stefano Spezia, Jun 27 2022: (Start)
O.g.f.: (1 + x^2 + 3*x^3 + 4*x^4)/((1 - x)*(1 + x)*(1 - x + x^2)).
E.g.f.: 5*cosh(x) - 2*sqrt(3)*exp(x/2)*sin(sqrt(3)*x/2) + 4*(sinh(x) - 1). (End)
EXAMPLE
1 + 1 + 2 + 4 + 8 + 7 + 5 = 28 -> 2 + 8 = 10 -> a(7) = 1.
MATHEMATICA
a[n_] := PowerMod[2, n-1, 9]; a[0] = 1; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 29 2011 *)
Join[{1}, LinearRecurrence[{1, 0, -1, 1}, {1, 2, 4, 8}, 110]] (* or *) Join[{1}, PowerMod[2, Range[110], 9]] (* Harvey P. Dale, Nov 24 2014 *)
PROG
(Sage) [power_mod(2, n, 9)for n in range(0, 105)] # Zerinvary Lajos, Nov 03 2009
(PARI) a(n)=if(n, [5, 1, 2, 4, 8, 7][n%6+1], 1) \\ Charles R Greathouse IV, Nov 29 2011
CROSSREFS
Sequence in context: A016017 A071571 A201568 * A153130 A225746 A021406
KEYWORD
base,nonn,nice,easy
AUTHOR
Amela2(AT)aol.com
EXTENSIONS
More terms from Cino Hilliard, Dec 31 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 05:33 EDT 2024. Contains 372579 sequences. (Running on oeis4.)