OFFSET
1,1
COMMENTS
Except for n=6, only the powers of 3 primes are needed, namely 3^n, 5^n and 7^n, which leads to an ultra-fast O(n) execution time. I executed the algorithm in Greenberg (1988) with a PARI/GP program in only a few seconds for 1000 terms. - Mike Oakes, Aug 16 2016
LINKS
Mike Oakes, Table of n, a(n) for n = 1..1000
H. Greenberg, Solution to a linear diophantine equation for nonnegative integers, Journal of Algorithms, 9 (1988), 343-353.
EXAMPLE
For n=2, 114 is the largest integer which cannot be written as a sum of squares of odd primes.
MATHEMATICA
With[{prs=Prime[Range[2, 5]]}, Table[FrobeniusNumber[prs^n], {n, 20}]] (* Harvey P. Dale, Sep 19 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Mike Oakes, Aug 07 2016
STATUS
approved