OFFSET
2,1
COMMENTS
The Frobenius number of a numerical semigroup generated by relatively prime integers a_1, ..., a_n is the largest positive integer that is not a nonnegative linear combination of a_1,...,a_n. Since consecutive squares are relatively prime, they generate a numerical semigroup with a Frobenius number. The Frobenius number of a 2-generated semigroup <a,b> has the formula ab-a-b.
Given the set {n, n+1, n+2, n+3} and starting at n=0, the sum of all possible products of the terms in all possible subsets = a(n+2). Example for n=5, 5+6+7+8=26; 5(6+7+8)+6*(7+8)+7*8=277; 5*(6*7+6*8+7*8)+6*7*8=1066; 5*6*7*8=1680 and the sum of these 15 possible subsets is 3023 = a(5+2) = a(7). The sum is a(n+2) = n^4 + 10*n^3 + 35*n^2 + 50*n + 23. - J. M. Bergot, Apr 17 2013
LINKS
T. D. Noe, Table of n, a(n) for n = 2..1000
R. Fröberg, C. Gottlieb and R. Häggkvist, On numerical semigroups, Semigroup Forum, 35 (1987), 63-83 (for definition of Frobenius number).
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n^2*(n+1)^2-n^2-(n+1)^2 = n^4+2*n^3-n^2-2*n-1.
a(n) = Numerator of ((n + 2)! - (n - 2)!)/n!, n >=2. - Artur Jasinski, Jan 09 2007
G.f.: x^2*(23+4*x-6*x^2+4*x^3-x^4)/(1-x)^5. [Colin Barker, Feb 14 2012]
a(n) = (n-1)*n*(n+1)*(n+2) - 1 = A052762(n+2) - 1. - Jean-Christophe Hervé, Nov 01 2015
EXAMPLE
a(2)=23 because 23 is not a nonnegative linear combination of 4 and 9, but all integers greater than 23 are.
MAPLE
seq(n^4+2*n^3-n^2-2*n-1, n=2..50); # Robert Israel, Nov 01 2015
MATHEMATICA
Table[(n^2-1)((n+1)^2-1)-1, {n, 2, 30}] (* T. D. Noe, Nov 27 2006 *)
FrobeniusNumber/@Partition[Range[2, 40]^2, 2, 1] (* Harvey P. Dale, Jul 25 2012 *)
PROG
(PARI) x='x+O('x^50); Vec(x^2*(23+4*x-6*x^2+4*x^3-x^4)/(1-x)^5) \\ Altug Alkan, Nov 01 2015
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Victoria A Sapko (vsapko(AT)canes.gsw.edu), Apr 05 2002
EXTENSIONS
Corrected by T. D. Noe, Nov 27 2006
STATUS
approved