OFFSET
1,2
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..500
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
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}]
PROG
(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
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Oct 01 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 04 2006
More terms from Bruno Berselli, Nov 27 2012
STATUS
approved