OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Eric Weisstein's World of Mathematics, Stöhr Sequence.
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,1,4,-2).
FORMULA
All h-Stohr sequences have formula: h terms 1,2,..,2^(n-1),..,2^(h-1) and then continue (2^h-1)(n-h)+1. - Henry Bottomley, Feb 04 2000
So we get the sums from the piecewise function:
for odd n>=1, a(n)=2^((n+1)/2)-n+((n+1)/2)-2+Sum_{i=0..((n+1)/2)-1}(2*i+1)*(2^(((n+1)/2)-i) -1);
for even n>=2, a(n)=2^((n/2)+2)-n-4+Sum_{i=0..(n/2)-1}(2*i+1)*(2^((n/2)-i) -1). - Jeffrey R. Goodwin, Aug 09 2011
Let odd m>=3, then a(n)=a(m)-A000295(((m+1)/2)+1), where n>=2 is even. - Jeffrey R. Goodwin, Aug 09 2011
Let even m>=2, then a(n)=a(m)-A077802(m/2)=a(m)-A095151(m/2), where n>=1 is odd. - Jeffrey R. Goodwin, Aug 09 2011
G.f.:(1 + x - x^2)/((-1 + x)^3*(-1 - x + 2*x^2 + 2*x^3)). - Alexander R. Povolotsky, Aug 09 2011
a(n+4) = -2*a(n)+3*a(n+2)+n+5. - Alexander R. Povolotsky, Aug 09 2011
a(n) = 1/8*(2^(n/2+2)*((10-7*sqrt(2))*(-1)^n+10+7*sqrt(2))-(-1)^n-2*n*(n+12)-79). - _Alexander R. Povolotsky, Aug 09 2011
EXAMPLE
MATHEMATICA
A193911=t={0, 1}; Do[AppendTo[t, t[[-2]]+t[[-1]]]; AppendTo[t, 2*t[[-2]]], {n, 41}]; Drop[Nest[Accumulate, t, 2], 1] (* Vladimir Joseph Stephan Orlovsky, Jan 27 2012 *)
LinearRecurrence[{2, 2, -6, 1, 4, -2}, {1, 3, 7, 14, 25, 43}, 40] (* Harvey P. Dale, Jun 20 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeffrey R. Goodwin, Aug 08 2011
STATUS
approved