OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
M. Beck and S. Zack, Refined upper bounds for the Diophantine problem of Frobenius, arXiv:math/0305420 [math.NT], 2003-2005.
A. Brauer and J.E. Shockley, On a Problem of Frobenius, J. reine angew. Math. 211(1962), 215-220.
Robert W. Owens, An Algorithm to Solve the Frobenius Problem, Math. Mag. 76(2003), 264-275.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = n^3 - n^2 - 1. [This follows from the well-known fact that the largest integer not expressible as a nonnegative linear combination of a and b is the number ab-a-b. - Matthias Beck (beck(AT)math.sfsu.edu), Sep 22 2005]
a(1)=-1, a(2)=3, a(3)=17, a(4)=47; for n>4, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Jul 19 2011
G.f.: x*(x*((x-1)*x+7)-1)/(x-1)^4. - Harvey P. Dale, Jul 19 2011
EXAMPLE
For n=2, we have to consider nonnegative linear combinations of 2 and 5. Now 3 is not such a combination, but 4=2*2 and 5=1*5 and any positive integer greater than 3 is of the form 2a+b where a and b are nonnegative integers with b equal to 4 or 5. Therefore a(2)=3.
MAPLE
with (combinat):seq(n^3-fibonacci(3, n), n=1..29); # Zerinvary Lajos, May 25 2008
MATHEMATICA
Table[n^3-n^2-1, {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2011 *)
LinearRecurrence[{4, -6, 4, -1}, {-1, 3, 17, 47}, 100] (* Harvey P. Dale, Jul 19 2011 *)
PROG
(Magma) [n^3-n^2-1: n in [1..35]]; // Vincenzo Librandi, Jul 20 2011
(PARI) a(n)=n^3-n^2-1 \\ Charles R Greathouse IV, Aug 01 2011
CROSSREFS
KEYWORD
sign,easy
AUTHOR
John W. Layman, Oct 15 2003
STATUS
approved