|
| |
|
|
A007679
|
|
If n mod 4 = 0 then 2^(n-1)+1 elif n mod 4 = 2 then 2^(n-1)-1 else 2^(n-1).
(Formerly M3359)
|
|
2
| |
|
|
1, 1, 4, 9, 16, 31, 64, 129, 256, 511, 1024, 2049, 4096, 8191, 16384, 32769, 65536, 131071, 262144, 524289, 1048576, 2097151, 4194304, 8388609, 16777216, 33554431, 67108864, 134217729, 268435456, 536870911
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,3
|
|
|
REFERENCES
| M. E. Larsen, Summa Summarum, A. K. Peters, Wellesley, MA, 2007; see p. 37. [From N. J. A. Sloane (njas(AT)research.att.com), Jan 29 2009]
I. Nemes et al., How to do Monthly problems with your computer, Amer. Math. Monthly, 104 (1997), 505-519.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
|
FORMULA
| 2^(n-1) + cos(n*Pi/2).
Sum 2^k*C(n-k, 2k)*n/(n-k), k = 0..[ n/3 ].
a(n) = A007909(n) + A007910(n).
|
|
|
MAPLE
| f:=n->2^(n-1)+cos(Pi*n/2);
|
|
|
CROSSREFS
| Sequence in context: A093175 A138992 A199936 * A068037 A167188 A014764
Adjacent sequences: A007676 A007677 A007678 * A007680 A007681 A007682
|
|
|
KEYWORD
| easy,nonn
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com), R. K. Guy, Simon Plouffe.
|
| |
|
|