|
|
A180306
|
|
a(n) is the largest integer k for which the Frobenius equation a_1*x_1 + a_2*x_2 + ... + a_n*x_n == k has no nonnegative integer solutions, where the a_i are consecutive primes beginning with the n-th prime.
|
|
2
|
|
|
1, 4, 9, 16, 27, 35, 49, 63, 65, 85, 95, 105, 121, 135, 145, 169, 175, 187, 203, 209, 221, 253, 265, 273, 289, 301, 305, 319, 351, 369, 387, 403, 407, 425, 445, 473, 485, 495, 517, 529, 545, 551, 567, 611, 615, 635, 639, 671, 679, 693, 703, 725, 747, 781, 793
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Many terms are squares, their square roots being 1, 2, 3, 4, 7, 11, 13, 17, 23, 35, 37, 59, 69, 79, 89, 101, 103, ..., .
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
f[n_] := FrobeniusNumber[ Prime@ Range[n, n + 100]]; Array[f, 55]
FrobeniusNumber/@Partition[Prime[Range[300]], 100, 1] (* Harvey P. Dale, Jun 01 2017 *)
|
|
PROG
|
(PARI) issum(n, x)=if(isprime(n), return(n>=x)); if(if(n%2, n<3*x, n<2*x), return(!n)); forprime(p=x, n-if(n%2, 2*x, x), if(issum(n-p, p), return(1))); 0
a(n)=if(n<2, return(1)); my(p=prime(n), k=2*p-2, lower=k, upper=2*k+2); while(upper>lower, if(issum(upper, p), upper--, lower=2*k+2; k=upper; upper=2*k+2)); k \\ Charles R Greathouse IV, Apr 03 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|