%I #7 Jun 13 2015 00:54:34
%S 1,9,135,231,765,1045,2275,2835,5049,5985,9471,10879,15925,17901,
%T 24795,27435,36465,39865,51319,55575,69741,74949,92115,98371,118825,
%U 126225,150255,158895,186789,196765,228811,240219,276705,289641,330855,345415,391645,407925
%N Odd octagonal pyramidal numbers
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1).
%F a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7).
%F a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) + 384.
%F a(n) = (4*n-(-1)^n-1)*(4*n-(-1)^n-3)*(4*n-(-1)^n-4)/8.
%F G. f. x(1+8*x+123*x^2+72*x^3+159*x^4+16*x^5+5*x^6)/((1-x)^4*(1+x)^3).
%e The sequence of octagonal pyramidal numbers A002414 begins 1, 9, 30, 70, 135, 231, 364, 540, 765, 1045, … As the third odd term is 135, then a(3) = 135.
%t LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,9,135,231,765,1045,2275},38]
%Y Cf. A002414, A218327.
%K nonn
%O 1,2
%A _Ant King_, Oct 27 2012