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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010684 Period 2: repeat (1,3); offset 0. 42
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Hankel transform is [1,-8,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Mar 29 2007

Binomial transform gives [1,4,8,16,32,64,...] (A151821(n+1)). - Philippe Deléham, Sep 17 2009

Continued fraction expansion of (3+sqrt(21))/6. - Klaus Brockhaus, May 04 2010

Positive sum of the coordinates from the image of the point (1,-2) after n 90 degree rotations about the origin. - Wesley Ivan Hurt, Jul 06 2013

This sequence can be generated by an infinite number of formulas having the form a^(b*n) mod c where a is congruent to 3 mod 4 and b is any odd number. If a is congruent to 3 mod 4 then c can be 4; if a is also congruent to 3 mod 8 then c can be 8. For example: a(n)= 15^(3*n) mod 4, a(n) = 19^(5*n) mod 4, a(n) = 19^(5*n) mod 8. - Gary Detlefs, May 19 2014

LINKS

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

Index entries for linear recurrences with constant coefficients, signature (0,1).

FORMULA

a(n) = 2-(-1)^n. G.f.: (1+3x)/((1-x)(1+x)). E.g.f.: 2exp(x)-exp(-x). - Paul Barry, Apr 29 2003

a(n) = 3*(n mod 2) + (n+1) mod 2. - Paolo P. Lava, Oct 20 2006

a(n) = 2*A153643(n) - A153643(n+1). - Paul Curtz, Dec 30 2008

a(n) = 3^(n mod 2). - Jaume Oliver Lafont, Mar 27 2009

a(n) = 7^n mod 4. - Vincenzo Librandi, Feb 07 2011

a(n) = 1 + 2*(n mod 2). - Wesley Ivan Hurt, Jul 06 2013

a(n) = A000034(n) + A000035(n). - James Spahlinger, Feb 14 2016

MAPLE

[seq (modp((2*n+1), 4), n=0..80)]; # Zerinvary Lajos, Nov 30 2006

MATHEMATICA

Table[2-(-1)^n, {n, 0, 100}] (* Wesley Ivan Hurt, Mar 24 2014 *)

PROG

(Sage) [power_mod(3, n, 8)for n in xrange(0, 81)] # Zerinvary Lajos, Nov 24 2009

(PARI) a(n)=1+n%2*2 \\ Charles R Greathouse IV, Dec 28 2011

CROSSREFS

Cf. A112030, A112033, A176014 (decimal expansion of (3+sqrt(21))/6).

Sequence in context: A066056 A153284 A112030 * A176040 A125768 A266875

Adjacent sequences:  A010681 A010682 A010683 * A010685 A010686 A010687

KEYWORD

nonn,easy

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 August 24 06:49 EDT 2017. Contains 291052 sequences.