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.

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

Original entry on oeis.org

2, 2, 3, 6, 8, 24, 27, 108, 112, 560, 565, 3390, 3396, 23772, 23779, 190232, 190240, 1712160, 1712169, 17121690, 17121700, 188338700, 188338711, 2260064532, 2260064544, 29380839072, 29380839085, 411331747190, 411331747204, 6169976208060, 6169976208075, 98719619329200
Offset: 0

Views

Author

Keywords

Crossrefs

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

Programs

  • Maple
    A[0]:= 2:
    for n from 0 to 14 do
      A[2*n+1]:= (n+1)*A[2*n];
      A[2*n+2]:= (n+1)+A[2*n+1];
    od:
    seq(A[i],i=0..30); # Robert Israel, Dec 22 2015
  • Mathematica
    a = {2}; Do[If[EvenQ@ Length@ a, AppendTo[a, Floor[Length[a]/2] Last@ a],
    AppendTo[a, Last@ a + Floor[Length[a] /2]]], {k, 27}]; Rest@ a (* Michael De Vlieger, Dec 22 2015 *)
  • PARI
    A019465(n,a=2)={for(i=2,n+1,if(bittest(i,0),a+=i\2,a*=i\2));a} \\ M. F. Hasler, Feb 25 2018

Formula

From Robert Israel, Dec 22 2015: (Start)
a(2*k) = 2*k! + Sum_{j=0..k-1} k!/j! = 2*k! + k*e*Gamma(k,1).
a(2*k+1) = 2*(k+1)! + Sum_{j=0..k-1} (k+1)!/j! = 2*(k+1)! + k*(k+1)*e*Gamma(k,1).
a(n) ~ (e+2)*(ceiling(n/2))!. (End)

Extensions

Edited by M. F. Hasler, Feb 25 2018