login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A019463
Add 1, multiply by 1, add 2, multiply by 2, etc., start with 1.
9
1, 2, 2, 4, 8, 11, 33, 37, 148, 153, 765, 771, 4626, 4633, 32431, 32439, 259512, 259521, 2335689, 2335699, 23356990, 23357001, 256927011, 256927023, 3083124276, 3083124289, 40080615757, 40080615771, 561128620794, 561128620809, 8416929312135, 8416929312151, 134670868994416
OFFSET
0,2
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
Cf. A019461 (same, but start with 0), A019460 (start with 2), A019462, (start with 3), A082448. (start with 4).
Cf. A082458, A019464, A019465, A019466 (similar, but first multiply, then add).
Cf. A019762.
Sequence in context: A056381 A245597 A324039 * A152763 A221666 A086700
KEYWORD
nonn
EXTENSIONS
Edited by M. F. Hasler, Feb 25 2018
STATUS
approved