%I A001057
%S A001057 0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,
%T A001057 13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,
%U A001057 22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31
%V A001057 0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7,8,-8,9,-9,10,-10,11,-11,12,-12,
%W A001057 13,-13,14,-14,15,-15,16,-16,17,-17,18,-18,19,-19,20,-20,21,-21,22,
%X A001057 -22,23,-23,24,-24,25,-25,26,-26,27,-27,28,-28,29,-29,30,-30,31,-31
%N A001057 Each integer occurs exactly once: interleaved positive and negative integers
with zero prepended.
%C A001057 Unsigned sequence (A008619) gives number of partitions of n in which
the greatest part is 2. - Robert G. Wilson v (rgwv(AT)rgwv.com),
Jan 11 2002
%C A001057 Go forwards and backwards with increasing step sizes. - Daniele Parisse
and Franco Virga (daniele.parisse(AT)eads.com), Jun 06 2005
%C A001057 The partial sums of the divergent series 1 - 2 + 3 - 4 + ... give this
sequence. Euler summed it to 1/4 which was one of the first examples
of summing divergent series. - Michael Somos May 22 2007
%C A001057 Contribution from Peter Luschny (peter(AT)luschny.de), Jul 12 2009: (Start)
%C A001057 The general formula for alternating sums of powers is in terms of the
Swiss-Knife polynomials P(n,x) A153641 2^(-n-1)(P(n,1)-(-1)^k P(n,
2k+1)). Thus
%C A001057 a(k) = 2^(-2)(P(1,1)-(-1)^k P(1,2k+1)). (End)
%D A001057 G. Myerson and A. J. van der Poorten, Some problems concerning recurrence
sequences, Amer. Math. Monthly, 102 (1995), 698-705.
%H A001057 T. D. Noe, <a href="b001057.txt">Table of n, a(n) for n=0..1000</a>
%H A001057 G. Myerson and A. J. van der Poorten, <a href="http://www-centre.mpce.mq.edu.au/
alfpapers/a106.pdf">Some problems concerning recurrence sequences</
a>, Amer. Math. Monthly, 102 (1995), 698-705.
%H A001057 Wikipedia, <a href="http://en.wikipedia.org/wiki/1_%E2%88%92_2_%2B_3_%E2%88%92_4_%2B_%C2%B7_%C2%B7_%C2%B7">
1 - 2 + 3 - 4 + ...</a>
%F A001057 Euler transform of [ -1, 2] is sequence a(n+1).
%F A001057 G.f.: x/((1+x)(1-x^2)). E.g.f.: (exp(x)-(1-2x)exp(-x))/4.
%F A001057 a(n)=1-2*a(n-1)-a(n-2); a(2n)=-n, a(2n+1)=n+1.
%F A001057 a(n)=-a(n-1)+a(n-2)+a(n-3). a(n)=(-1)^(n+1)*floor((n+1)/2).
%F A001057 a(1) = 1, a(n) = a(n-1)+n or a(n-1)-n whichever is closer to 0 on the
number line. Or a(n) = min{absolute[a(n-1) +n], absolute[a(n-1) -n]}.
- Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jul 01 2003
%F A001057 a(n)=sum{k=0..n, k*(-1)^(k+1) } - Paul Barry (pbarry(AT)wit.ie), Aug
20 2003
%F A001057 a(n)=(1-(2n+1)(-1)^n)/4 - Paul Barry (pbarry(AT)wit.ie), Feb 02 2004
%F A001057 a(0)=0; a(n) = (-1)^(n-1) * (n-|a(n-1)|) for n >= 1. - Rick L. Shepherd
(rshepherd2(AT)hotmail.com), Jul 14 2004
%F A001057 a(n)=a(n-1)-n*(-1)^n, a(0)=0; or a(n)=-a(n-1)+(1-(-1)^n)/2, a(0)=0. -
Daniele Parisse and Franco Virga (daniele.parisse(AT)eads.com), Jun
06 2005
%p A001057 a := n -> (1-(-1)^n*(2*n+1))/4; [From Peter Luschny (peter(AT)luschny.de),
Jul 12 2009]
%o A001057 (PARI) a(n)=if(n%2,n\2+1,-n/2)
%Y A001057 A008619(n)=|a(n+1)|, A004526(n)=|a(n-1)|.
%Y A001057 Cf. A166711, A166871. [From Jaume Oliver Lafont (joliverlafont(AT)gmail.com),
Oct 30 2009]
%Y A001057 Sequence in context: A111660 A127365 A065033 this_sequence A130472 A004526
A140106
%Y A001057 Adjacent sequences: A001054 A001055 A001056 this_sequence A001058 A001059
A001060
%K A001057 sign,nice,easy
%O A001057 0,4
%A A001057 N. J. A. Sloane (njas(AT)research.att.com).
%E A001057 Thanks to Michael Somos for helpful comments.
|