login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A019464 Multiply by 1, add 1, multiply by 2, add 2, etc., start with 1. 11
1, 1, 2, 4, 6, 18, 21, 84, 88, 440, 445, 2670, 2676, 18732, 18739, 149912, 149920, 1349280, 1349289, 13492890, 13492900, 148421900, 148421911, 1781062932, 1781062944, 23153818272, 23153818285, 324153455990, 324153456004, 4862301840060, 4862301840075, 77796829441200 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
For n>=1, a(2n)=floor((1+e)*(n-1)!)-1, a(2n+1)=floor((1+e)*(n+1)!)-n-2. - Benoit Cloitre, Apr 29 2003
a(n+1) = (1/2)*a(n)*(n+1 mod 2)*(n+2) + (1/2)*(n mod 2)*(2*a(n)+n+1). - Francois Jooste (pin(AT)myway.com), Jun 25 2003
MATHEMATICA
a[n_?EvenQ] := n/2 + a[n-1]; a[n_?OddQ] := (n+1)*a[n-1]/2;
a[0] = 1; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Nov 15 2011 *)
PROG
(Haskell)
a019464 n = a019464_list !! n
a019464_list = 1 : concat (unfoldr ma (1, [1, 1])) where
ma (x, [_, j]) = Just (ij', (x + 1, ij')) where ij' = [x * j, x * j + x]
-- Reinhard Zumkeller, Nov 14 2011
(PARI) A019464(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. A033540 (=a(2n)).
Cf. A082458 (same, but start with 0), A019465 (start with 2), A019466 (start with 3).
Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).
Sequence in context: A074131 A355078 A335038 * A064402 A268577 A075229
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Feb 25 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:13 EDT 2024. Contains 371905 sequences. (Running on oeis4.)