OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..50
V. A. Liskovets, Some easily derivable sequences, J. Integer Sequences, 3 (2000), #00.2.2.
FORMULA
E.g.f.: log(f(x)*(cos(x) + sin(x))), where f(x) = Sum_{j >= 0} 3^binomial(j, 2)*x^j/j!. - G. C. Greubel, Apr 29 2023
MATHEMATICA
nn = 15; g[z] := Sum[(1 + 2 u)^Binomial[n, 2] z^n/n!, {n, 0, nn}]; Drop[
Map[Total[#[[1 ;; Binomial[nn, 2] + 1 ;; 2]]]&, Range[0, nn]!CoefficientList[
Series[Log[g[z]], {z, 0, nn}], {z, u}]], 1] (* Geoffrey Critzer, Jul 28 2016 *)
PROG
(PARI) seq(n)={my(A=O(x*x^n)); Vec(serlaplace(log(sum(k=0, n, 3^binomial(k, 2)*x^k/k!) + A) + log(cos(x + A) + sin(x + A)))/2)} \\ Andrew Howroyd, Sep 10 2018
(Magma)
m:=30;
f:= func< x | (&+[3^Binomial(n, 2)*x^n/Factorial(n) : n in [0..m+3]]) >;
R<x>:=PowerSeriesRing(Rationals(), m);
Coefficients(R!(Laplace( Log(f(x)*(Cos(x) + Sin(x)))/2 ))); // G. C. Greubel, Apr 29 2023
(SageMath)
m=30
def f(x): return sum(3^binomial(n, 2)*x^n/factorial(n) for n in range(m+4))
def A054941_list(prec):
P.<x> = PowerSeriesRing(QQ, prec)
return P( log(f(x)*(cos(x) + sin(x)))/2 ).egf_to_ogf().list()
a=A054941_list(40); a[1:] # G. C. Greubel, Apr 29 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 24 2000
EXTENSIONS
More terms from Vladeta Jovovic, Mar 11 2003
STATUS
approved