OFFSET
0,3
FORMULA
a(n) = A000957(2*n+1).
MAPLE
b:= proc(n) option remember; `if`(n<3, n*(2-n),
((7*n-12)*b(n-1)+(4*n-6)*b(n-2))/(2*n))
end:
a:= n-> b(2*n+1):
seq(a(n), n=0..25); # Alois P. Heinz, Apr 26 2023
PROG
(PARI)
x='x+O('x^100); v=Vec((1-sqrt(1-4*x))/(3-sqrt(1-4*x)));
vector(#v\2, n, v[2*n-1]) /* show terms */
(Python)
from itertools import count, islice
def A138414_gen(): # generator of terms
yield 1
a, c = 0, 1
for n in count(1, 2):
yield (a:=(c:=c*((n<<2)+2)//(n+2))-a>>1)
a=(c:=c*((n+1<<2)+2)//(n+3))-a>>1
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 08 2008
STATUS
approved