|
| |
|
|
A010684
|
|
Period 2: repeat (1,3); offset 0.
|
|
32
| |
|
|
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; internal format)
|
|
|
|
OFFSET
| 0,2
|
|
|
COMMENTS
| Hankel transform is [1,-8,0,0,0,0,0,0,0,0,...] . - Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Mar 29 2007
Submitted A153643=2,3,3,5,7,13,23,. A153643(n+1)-2*A153643(n)=-a(n). [From Paul Curtz (bpcrtz(AT)free.fr), Dec 30 2008]
Binomial transform give [1,4,8,16,32,64,...] (A151821(n+1)). [From Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Sep 17 2009]
Continued fraction expansion of (3+sqrt(21))/6. [From Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), May 04 2010]
|
|
|
LINKS
| Index to sequences with 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 (pbarry(AT)wit.ie), Apr 29 2003
a(n)=3*(n mod 2)+(n+1) mod 2 - Paolo P. Lava (paoloplava(AT)gmail.com), Oct 20 2006
a(n)=3^(n mod 2) [From Jaume Oliver Lafont (joliverlafont(AT)gmail.com), Mar 27 2009]
a(n)=7^n mod 4. [From Vincenzo Librandi, Feb 07 2011]
|
|
|
MAPLE
| [seq (modp((2*n+1), 4), n=0..80)]; - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 30 2006
|
|
|
PROG
| (Other) sage: [power_mod(3, n, 8)for n in xrange(0, 81)] # [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 24 2009]
(MAGMA) [7^n mod 4: n in [0..80]]; [From Vincenzo Librandi, Feb 07 2011]
(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 A111742
Adjacent sequences: A010681 A010682 A010683 * A010685 A010686 A010687
|
|
|
KEYWORD
| nonn,easy
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
| |
|
|