login
A111017
a(n) = (A102877(n+1) - A102877(n))/2.
2
0, 1, 2, 7, 20, 61, 180, 543, 1622, 4873, 14598, 43815, 131384, 394213, 1182456, 3547551, 10642110, 31926873, 95778990, 287338599, 862010924, 2586037645, 7758098316, 23274309567, 69822884886, 209468698473, 628405963974
OFFSET
0,3
COMMENTS
First differences of A102877, divided by 2.
LINKS
FORMULA
From Robert Israel, Jun 30 2020: (Start)
a(2*n) = 2*a(2*n-1) + 3*a(2*n-2) - 2*a(n-2) for n >= 2.
a(2*n+1) = 2*a(2*n) + 3*a(2*n-1) for n >= 1.
G.f. g(z) = ((1/z - 1)*h(z) - 1/z)/2 where h(z) is the G.f. of A102877.
(3*z-1)*(z+1)*g(z) = 2*z^4*g(z^2)-z.
(End)
MAPLE
f:= proc(n) option remember;
if n::even then 2*procname(n-1)+3*procname(n-2)-2*procname(n/2-2)
else 2*procname(n-1)+3*procname(n-2)
fi
end proc:
f(0):= 0: f(1):= 1: f(2):= 2:
map(f, [$0..50]); # Robert Israel, Jun 30 2020
MATHEMATICA
a[0] := 1; a[1] := 1; a[n_] := If[EvenQ[n], 3*a[n - 1], 3*a[n - 1] - 2*a[(n - 3)/2]]; Table[(a[i + 1] - a[i])/2, {i, 1, 50}] (* Stefan Steinerberger, May 22 2007 *)
PROG
(PARI) {m=27; v=vector(m+1); v[1]=1; v[2]=1; for(n=2, m, k=3*v[n]; if(n%2==1, k=k-2*v[(n-1)/2]); v[n+1]=k); w=vector(m, n, (v[n+1]-v[n])/2); print(w)} /* Klaus Brockhaus, May 20 2007 */
CROSSREFS
Cf. A102877.
Sequence in context: A025180 A201967 A116950 * A116408 A015518 A014983
KEYWORD
nonn
AUTHOR
Paul Curtz, May 17 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus and Stefan Steinerberger, May 20 2007
STATUS
approved