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.

A019461 Add 1, multiply by 1, add 2, multiply by 2, etc.; start with 0.

This page as a plain text file.
%I A019461 #23 Oct 24 2024 16:24:48
%S A019461 0,1,1,3,6,9,27,31,124,129,645,651,3906,3913,27391,27399,219192,
%T A019461 219201,1972809,1972819,19728190,19728201,217010211,217010223,
%U A019461 2604122676,2604122689,33853594957,33853594971,473950329594,473950329609,7109254944135,7109254944151,113748079106416
%N A019461 Add 1, multiply by 1, add 2, multiply by 2, etc.; start with 0.
%H A019461 Seiichi Manyama, <a href="/A019461/b019461.txt">Table of n, a(n) for n = 0..899</a>
%H A019461 Nick Hobson, <a href="/A019461/a019461.py.txt">Python program for this sequence</a>
%p A019461 A019461 := proc(n) option remember; if n = 0 then 0 elif n mod 2 = 1 then (n+1)/2+A019461(n-1) else (n/2)*A019461(n-1); fi; end;
%t A019461 Module[{a = 0}, Join[{a}, Flatten[Array[{a += #, a *= #} &, 20]]]] (* _Paolo Xausa_, Oct 24 2024 *)
%o A019461 (PARI) A019461(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
%Y A019461 Cf. A019463 (same, but start with 1), A019460 (start with 2), A019462 (start with 3), A082448 (start with 4).
%Y A019461 Cf. A082458, A019464 .. A019466 (similar, but first multiply, then add).
%K A019461 nonn
%O A019461 0,4
%A A019461 _N. J. A. Sloane_
%E A019461 Edited by _M. F. Hasler_, Feb 25 2018