cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A019464 Multiply by 1, add 1, multiply by 2, add 2, etc., start with 1.

This page as a plain text file.
%I A019464 #34 Aug 04 2025 11:08:53
%S A019464 1,1,2,4,6,18,21,84,88,440,445,2670,2676,18732,18739,149912,149920,
%T A019464 1349280,1349289,13492890,13492900,148421900,148421911,1781062932,
%U A019464 1781062944,23153818272,23153818285,324153455990,324153456004,4862301840060,4862301840075,77796829441200
%N A019464 Multiply by 1, add 1, multiply by 2, add 2, etc., start with 1.
%H A019464 Reinhard Zumkeller, <a href="/A019464/b019464.txt">Table of n, a(n) for n = 0..500</a>
%F A019464 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
%F A019464 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
%F A019464 a(n) = (n mod 2)*(floor((1+e)*(floor(n/2)+1)!)-floor(n/2)-2)+((n+1) mod 2)*(floor((1+e)*floor(n/2)!)-1) for n >= 1 with a(0) = 1. - _Wesley Ivan Hurt_, Aug 04 2025
%t A019464 a[n_?EvenQ] := n/2 + a[n-1]; a[n_?OddQ] := (n+1)*a[n-1]/2;
%t A019464 a[0] = 1; Table[a[n], {n, 0, 27}] (* _Jean-François Alcover_, Nov 15 2011 *)
%o A019464 (Haskell)
%o A019464 a019464 n = a019464_list !! n
%o A019464 a019464_list = 1 : concat (unfoldr ma (1, [1, 1])) where
%o A019464    ma (x, [_, j]) = Just (ij', (x + 1, ij')) where ij' = [x * j, x * j + x]
%o A019464 -- _Reinhard Zumkeller_, Nov 14 2011
%o A019464 (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
%Y A019464 Cf. A033540 (=a(2n)).
%Y A019464 Cf. A082458 (same, but start with 0), A019465 (start with 2), A019466 (start with 3).
%Y A019464 Cf. A019460 .. A019463 & A082448 (similar, but first add, then multiply).
%K A019464 nonn,easy,nice
%O A019464 0,3
%A A019464 _N. J. A. Sloane_
%E A019464 Edited by _M. F. Hasler_, Feb 25 2018