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.

A123145 a(1) = 1, a(n) = a(n-1) if n == 1 (mod 4), otherwise a(n) = n * a(n-1) for n >= 2.

Original entry on oeis.org

1, 2, 6, 24, 24, 144, 1008, 8064, 8064, 80640, 887040, 10644480, 10644480, 149022720, 2235340800, 35765452800, 35765452800, 643778150400, 12231784857600, 244635697152000, 244635697152000, 5381985337344000, 123785662758912000, 2970855906213888000
Offset: 1

Views

Author

Roger L. Bagula, Oct 01 2006

Keywords

Comments

Terms which repeat appear to be denominators of g.f. 0F2(--; 1/2, 3/4; z^4/64), which begin 24, 8064, 10644480, 35765452800, ... - Benedict W. J. Irwin, Jun 15 2018

Crossrefs

Programs

  • Magma
    function a(n) // a = A123145
      if n eq 1 then return 1;
      elif (n mod 4) eq 1 then return a(n-1);
      else return n*a(n-1);
      end if;
    end function;
    [a(n): n in [1..40]]; // G. C. Greubel, Jul 16 2023
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          `if`(irem(n, 4)=1, 1, n)*a(n-1))
        end:
    seq(a(n), n=1..24);  # Alois P. Heinz, Jul 16 2023
  • Mathematica
    a[n_]:= a[n]= If[n==1, 1, If[Mod[n,4]==1, a[n-1], n*a[n-1]]];
    Table[a[n], {n,30}]
  • SageMath
    def a(n): # A123145
        if (n==1): return 1
        elif (n%4==1): return a(n-1)
        else: return n*a(n-1)
    [a(n) for n in range(1,41)] # G. C. Greubel, Jul 16 2023

Formula

Conjecture: E.g.f.: E(x)=d(G(0))/dx where G(k) = 1 + x/(4*k+1 - x*(4*k+1)/(1 + x - x/(1 + x - x/(x + 1/G(k+1) )))), or shift on 1 left G(0); (continued fraction,5-step). - Sergei N. Gladkovskii, Nov 26 2012

Extensions

Edited by N. J. A. Sloane, Oct 04 2006
More terms from Bruno Berselli, Nov 27 2012