%I #44 Nov 02 2024 12:29:49
%S 1,-3,9,-21,9,297,-2421,12933,-52407,145293,-35091,-2954097,25228971,
%T -142080669,602217261,-1724917221,283305033,38852066421,-337425235479,
%U 1938308236731,-8364863310291,24286959061533,-3011589296289,-574023003011199,5028616107443691
%N (n+1)^2*a(n+1) = -(9*n^2 + 9*n + 3)*a(n) - 27*n^2*a(n-1), with a(0) = 1 and a(1) = -3.
%H Robert Israel, <a href="/A291898/b291898.txt">Table of n, a(n) for n = 0..1400</a>
%H Shaun Cooper, <a href="https://arxiv.org/abs/2302.00757">Apéry-like sequences defined by four-term recurrence relations</a>, arXiv:2302.00757 [math.NT], 2023.
%H Zhi-Hong Sun, <a href="https://arxiv.org/abs/1803.10051">Congruences for Apéry-like numbers</a>, arXiv:1803.10051 [math.NT], 2018.
%H Zhi-Hong Sun, <a href="https://arxiv.org/abs/2002.12072">Super congruences concerning binomial coefficients and Apéry-like numbers</a>, arXiv:2002.12072 [math.NT], 2020.
%H Zhi-Hong Sun, <a href="https://arxiv.org/abs/2004.07172">New congruences involving Apéry-like numbers</a>, arXiv:2004.07172 [math.NT], 2020.
%F Given A(x) is the g.f. of this sequence, B(x) is the g.f. of A005928, and C(x) is the g.f. of A121589, then B(x) = A(C(x)).
%F a(n) = (-1)^n * A006077(n).
%F 0 = y*(3 + 27*x) + y'*(1 + 18*x + 81*x^2) + y''*(x + 9*x^2 + 27*x^3) where y(x) is the g.f. of this sequence.
%e G.f. = 1 - 3*x + 9*x^2 - 21*x^3 + 9*x^4 + 297*x^5 - 2421*x^6 + ...
%p f:= gfun:-rectoproc({(n+1)^2*a(n+1) = -(9*n^2 + 9*n + 3)*a(n) - 27*n^2*a(n-1),a(0)=1,a(1)=-3},a(n),remember):
%p map(f, [$0..50]); # _Robert Israel_, Nov 02 2017
%t a[ n_] := If[ n < 0, 0,(-3)^n HypergeometricPFQ[ {-n, 1 - n, 2 - n}/3, {1, 1}, 1]];
%t a[ n_] := SeriesCoefficient[ HypergeometricPFQ[ {1, 2}/3, {1}, (3 x / (1 + 3 x))^3 ] / (1 + 3 x), {x, 0, n}];
%t nxt[{n_,a_,b_}]:={n+1,b,(-(9 n^2+9n+3)b- a 27n^2)/(n+1)^2}; NestList[nxt,{1,1,-3},30][[;;,2]] (* _Harvey P. Dale_, Nov 02 2024 *)
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( subst(eta(x + A)^3 / eta(x^3 + A), x, serreverse( x * eta(x^9 + A)^3 / eta(x + A)^3)), n))};
%o (Magma) I:=[-3,9]; [1] cat [n le 2 select I[n] else (-1)*((9*n^2-9*n+3)*Self(n-1) + 27*(n-1)^2*Self(n-2))/n^2: n in [1..30]]; // _G. C. Greubel_, Jul 28 2018
%Y Cf. A005928, A006077, A121589.
%K sign
%O 0,2
%A _Michael Somos_, Nov 02 2017