OFFSET
0,2
COMMENTS
Subsequence of primes begins 71, 547, 5741, 114031, 244861, 465011, 808081, 1037681. Subsequence of powers includes 537824 = 2^5 * 7^5.
The sequence is a quasipolynomial, so under the Bunyakovsky conjecture there are infinitely many primes in this sequence. - Charles R Greathouse IV, Aug 21 2011
Let s(0) = 0 and s(n) = A186707(n-1) for n > 0. Then s(n) is the number of 4-tuples (w,x,y,z) having all terms in {1, ..., n} and |w - x| < w + |y - z|. - Clark Kimberling, May 24 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (4,-5,0,5,-4,1).
FORMULA
From R. J. Mathar, Mar 24 2011: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 5*a(n-4) - 4*a(n-5) + a(n-6) = 7*n*(n^3/8 + n^2/2 + 3*n/4 + 1/2) + (15 + (-1)^n)/16.
G.f.: ( -1 - 10*x - 20*x^2 - 10*x^3 - x^4 ) / ( (1 + x)*(x - 1)^5 ). (End)
E.g.f.: (cosh(x) + 7*exp(x)*(1 + 15*x + 25*x^2 + 10*x^3 + x^4))/8. - Franck Maminirina Ramaharo, Nov 09 2018
MATHEMATICA
CoefficientList[Series[ (-1-10 x-20 x^2-10 x^3-x^4)/((x-1)^5 (1+x)), {x, 0, 40}], x] (* Harvey P. Dale, Apr 04 2011 *)
Table[7*n*(n^3 + 4*n^2 + 6*n + 4)/8 + (15 + (-1)^n)/16, {n, 0, 40}] (* T. D. Noe, Apr 04 2011 *)
PROG
(PARI) a(n)=7*n*(n^3+4*n^2+6*n+4)/8+(15+(-1)^n)/16 \\ Charles R Greathouse IV, Aug 21 2011
(Magma)[7*n*(n^3+4*n^2+6*n+4)/8+(15+(-1)^n)/16: n in [0..40] ]; // Vincenzo Librandi, Aug 22 2011
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Jonathan Vos Post, Feb 25 2011
STATUS
approved