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”).

A082458
Multiply by 1, add 1, multiply by 2, add 2, etc., starting with 0.
10
0, 0, 1, 2, 4, 12, 15, 60, 64, 320, 325, 1950, 1956, 13692, 13699, 109592, 109600, 986400, 986409, 9864090, 9864100, 108505100, 108505111, 1302061332, 1302061344, 16926797472, 16926797485, 236975164790, 236975164804, 3554627472060, 3554627472075, 56874039553200, 56874039553216
OFFSET
0,4
COMMENTS
Bisections: A007526 and A038154.
LINKS
FORMULA
For n>=2, a(2n)=floor(e*n!)-1, a(2*n+1)=(n+1)*(floor(e*n!)-1). - Benoit Cloitre, Apr 28 2003
MATHEMATICA
Module[{a = 0}, Join[{a}, Flatten[Array[{a *= #, a += #} &, 20]]]] (* Paolo Xausa, Oct 24 2024 *)
PROG
(PARI) a(n)=if(n<2, 0, if(n%2, (n+1)/2*(floor(exp(1)*((n-1)/2)!)-1), floor(exp(1)*(n/2)!)-1))
(PARI) A082458(n, a=0)={for(i=2, n+1, if(bittest(i, 0), a+=i\2, a*=i\2)); a} \\ M. F. Hasler, Feb 25 2018
CROSSREFS
Cf. A019464 (same, but start with 1), A019465 (start with 2), A019466 (start with 3).
Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).
Sequence in context: A106135 A067268 A285378 * A230770 A224703 A171943
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Apr 25 2003
EXTENSIONS
Edited by M. F. Hasler, Feb 25 2018
STATUS
approved