%I #30 Apr 28 2022 07:47:59
%S 1,21,133,481,1281,2821,5461,9633,15841,24661,36741,52801,73633,
%T 100101,133141,173761,223041,282133,352261,434721,530881,642181,
%U 770133,916321,1082401,1270101,1481221,1717633,1981281,2274181,2598421,2956161,3349633,3781141,4253061,4767841,5328001
%N Odd octagonal numbers indexed by triangular numbers.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F a(n) = 3*n^4 + 6*n^3 + 7*n^2 + 4*n + 1.
%F a(n) = (n^2 + n + 1)*(3*n^2 + 3*n + 1).
%F a(n) = ((3*n^2 + 3*n + 2)^2 - 1)/3.
%F a(n) = A003215(n) * A002061(n + 1).
%F a(n) = A022522(n) / A005408(n).
%F a(n) = A000567(n^2 + n + 1).
%F a(n) = A014641((n^2 + n)/2).
%F a(n) = 1 + A140676(n^2 + n).
%F a(n) = 1 + A187156((n^2 + n + 4)/2) (empirical).
%F G.f.: (1 + 16*x + 38*x^2 + 16*x^3 + x^4)/(1 - x)^5. - _Bruno Berselli_, Jun 03 2014
%F E.g.f.: exp(x)*(1 + 20*x + 46*x^2 + 24*x^3 + 3*x^4). - _Stefano Spezia_, Apr 16 2022
%e a(2) = 133 because the second triangular number is 3 and third odd octagonal number is 133.
%e a(3) = 481 because the third triangular number is 6 and the sixth odd octagonal number is 481.
%e a(4) = 1281 because the fourth triangular number is 10 and the tenth odd octagonal number is 1281.
%t Table[((3 n^2 + 3 n + 2)^2 - 1)/3, {n, 0, 39}] (* _Alonso del Arte_, Jun 01 2014 *)
%o (Magma) [3*n^4+6*n^3+7*n^2+4*n+1: n in [0..40]]; // _Bruno Berselli_, Jun 03 2014
%o (Sage) [3*n^4+6*n^3+7*n^2+4*n+1 for n in (0..40)] # _Bruno Berselli_, Jun 03 2014
%Y Row 5 of A059259 (coefficients of 1 + 4*n + 7*n^2 + 6*n^3 + 3*n^4 + 0*n^5 which is a formula for the within sequence).
%Y Column 5 of A081297.
%Y Column 6 of A072024.
%Y Diagonal T(n + 1, n) of A219069, n > 0.
%Y Cf. A000217, A000567, A002061, A003215, A005408, A014641, A022522, A140676, A187156.
%K nonn,easy
%O 0,2
%A _Mathew Englander_, Jun 01 2014