OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..900
Nick Hobson, Python program for this sequence.
FORMULA
Limit_{n->oo} a(2n)/n! = 1 + 2e = 1 + A019762. - Jon E. Schoenfield, Jan 16 2024
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, (t->
`if`(n::odd, t+(n+1)/2, t*n/2))(a(n-1)))
end:
seq(a(n), n=0..32); # Alois P. Heinz, Jan 16 2024
MATHEMATICA
For[i=1; lst={1}, i<15, i++, AppendTo[lst, i+Last[lst]]; AppendTo[lst, i Last[lst]]]; lst (* Harvey P. Dale, Feb 25 2012 *)
FoldList[If[OddQ[#2], #1 + (#2 + 1)/2, #1 * (#2/2)]&, 1, Range[32]] (* AnneMarie Torresen, Nov 26 2023 *)
PROG
(PARI) A019463(n, a=1)={for(i=2, n+1, if(bittest(i, 0), a*=i\2, a+=i\2)); a} \\ M. F. Hasler, Feb 25 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Feb 25 2018
STATUS
approved