%I #48 Dec 24 2023 02:46:58
%S 1,7,91,397,1141,2611,5167,9241,15337,24031,35971,51877,72541,98827,
%T 131671,172081,221137,279991,349867,432061,527941,638947,766591,
%U 912457,1078201,1265551,1476307,1712341,1975597,2268091,2591911,2949217,3342241,3773287,4244731
%N a(n) = 3*n^4 + 6*n^3 - 3*n + 1.
%C If gcd(n,7) = gcd(n+1,7) = gcd(2*n+1,7) = 1 then a(n) == 0 (mod 7) (E. Picutti, see References).
%D Ettore Picutti, Sul numero e la sua storia, Feltrinelli Economica, 1977, p. 208.
%H Bruno Berselli, <a href="/A181475/b181475.txt">Table of n, a(n) for n = 0..10000</a>.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F G.f.: (1 + 2*x + 66*x^2 + 2*x^3 + x^4)/(1-x)^5.
%F a(n) = a(-n-1) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 6*12.
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 6*A008594(n-1).
%F a(n) = 2*a(n-1) - a(n-2) + 6*A003154(n).
%F a(n) = a(n-1) + 6*A007588(n).
%F a(n) = 1 + 6*A062392(n).
%F a(n) = 7*A000540(n)/A000330(n) = A154105(A000096(n-1)) for n > 0.
%F Sum_{i=0..n} a(i) = (3*n^5 + 15*n^4 + 20*n^3 - 3*n + 5)/5.
%F a(n) = 7*(3*n^2 + 3*n - 1)*(Sum_{k=1..n} k^6)/(5*Sum_{k=1..n} k^4), n > 0. - _Gary Detlefs_, Oct 18 2011
%t Table[3 n^4 + 6 n^3 - 3 n + 1, {n, 0, 40}] (* _Vincenzo Librandi_, Mar 26 2013 *)
%t LinearRecurrence[{5,-10,10,-5,1},{1,7,91,397,1141},40] (* _Harvey P. Dale_, Jul 12 2022 *)
%o (Magma) [3*n^4+6*n^3-3*n+1: n in [0..31]];
%Y Subsequence of A003215.
%K nonn,easy
%O 0,2
%A _Bruno Berselli_, Oct 25 2010 - Oct 29 2010
%E Formula, program and crossref added by _Bruno Berselli_, Aug 22 2011