OFFSET
1,1
COMMENTS
All integers greater than 327 are also in the sequence. There are 163 values less than 327, and 164 in the complement of this sequence. The first value arising in two different ways is 156 = 52 + 52 + 52 = 78 + 78. The first triples of three consecutive values: (132,133,134), (160,161,162). "Use the Frobenius problem. Since gcd(52,133)=1 the maximum value not in the sequence is 52*133-52-133=6731 even using only 52 and 133, by a simple dp code you can check all values up to this limit and in fact n=327 is the maximum not in the original sequence." -- Robert Gerbicz.
LINKS
Wikipedia, Coin problem.
MAPLE
L := [14, 52, 78, 133, 248] ; # check whether n is a linear combination of op(.., L) with # some nonnegative a, b, c, d, e frob := proc(n, L) local a, b, c, d, e, nres ; for a from 0 do if a*op(1, L) > n then break; fi; for b from 0 do if a*op(1, L)+b*op(2, L) > n then break; fi; for c from 0 do if a*op(1, L)+b*op(2, L)+c*op(3, L) > n then break; fi; for d from 0 do if a*op(1, L)+b*op(2, L)+c*op(3, L)+d*op(4, L) > n then break; fi; nres := n-a*op(1, L)-b*op(2, L)-c*op(3, L)-d*op(4, L) ; if nres < 0 then break; fi; if nres = 0 then RETURN([a, b, c, d, 0]) ; fi; if ( nres mod op(5, L) ) = 0 then RETURN([a, b, c, d, nres/op(5, L)]) ; fi; od: od; od: od: RETURN([]) ; end: for n from 14 to 200 do f := frob(n, L) ; if f <> [] then print(n, f) ; fi; od: Extended and b-file by R. J. Mathar.
MATHEMATICA
ok[n_] := Reduce[a >= 0 && b >= 0 && c >= 0 && d >= 0 && e >= 0 && 14a + 52b + 78c + 133d + 248e == n, {a, b, c, d, e}, Integers] =!= False; Select[Range[196], ok] (* Jean-François Alcover, Sep 06 2011 *)
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Jonathan Vos Post, Jun 24 2009
EXTENSIONS
Better name from Joerg Arndt, May 23 2021
STATUS
approved