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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022003 Decimal expansion of 1/999. 16
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Expansion in any base b of 1/(b^3-1). E.g. 1/7 in base 2, 1/26 in base 3, 1/63 in base 4, etc. - Franklin T. Adams-Watters, Nov 07 2006

a(n) = A130196(n) - A131534(n). [From Reinhard Zumkeller, Nov 12 2009]

LINKS

Table of n, a(n) for n=0..98.

FORMULA

G.f.: x^2/(1-x^3). a(n) = -(1/2)((-1)^Floor[(2n-1)/3]+(-1)^Floor[(2n+1)/3]) - Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003

a(n) = 2/3*{cos[2*(n+1)*Pi/3]+1/2} with n>=0 a(n) = 1-[(n+1)^2 mod 3] with n>=0 a(n) = 1/9*{4*(n mod 3)-2*[(n+1) mod 3]+[(n+2) mod 3] with n>=0 - Paolo P. Lava, Nov 29 2006

a(n) = ((n+2) mod 3) mod 2. Also: a(n) = 1/2*(1-(-1)^(n+floor((n+2)/3))). - Hieronymus Fischer, May 29 2007

a(n) = (1+(-1)^Fib(n+1))/2, where Fib(n) = A000045(n). - Hieronymus Fischer, Jun 14 2007

a(n) = (n^5-n^2) mod 3. - Gary Detlefs, Mar 20 2010

a(n) = {(-1)^[a(n-1)+a(n-2)] +1}/2 starting from n=3. - Adriano Caroli, Nov 21 2010

a(n) = 1- Fibonacci(n+1) mod 2. - Gary Detlefs, Dec 26 2010

a(n) = floor((n+1)/3)-floor(n/3). - Tani Akinari, Oct 22 2012

EXAMPLE

0.001001001001001001001...

MATHEMATICA

Join[{0, 0}, RealDigits[1/999, 10, 120][[1]]] (* or *) PadRight[{}, 120, {0, 0, 1}] (* Harvey P. Dale, May 24 2012 *)

PROG

(PARI) a(n)=n%3==2 [From Jaume Oliver Lafont, Mar 24 2009]

CROSSREFS

Essentially the same as A079978.

Cf. A068601.

Partial sums are given by A002264(n+1).

Sequence in context: A099395 A171588 A131531 * A144604 A022926 A144595

Adjacent sequences:  A022000 A022001 A022002 * A022004 A022005 A022006

KEYWORD

nonn,cons

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 | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 18 05:08 EST 2017. Contains 294853 sequences.