/* Partitions OEIS: https://oeis.org/A000041 a(n) is the number of partitions of n (the partition numbers). 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135 Thus the answer should be 30. [program = if_then_else(B + 10,0,A - (A mod 8 != A)) + ((A != (B == A) mod (10 + 4)) + A),res = 30,count = 1] Here are some other suggestions: Gen 970 [program = (B - 6 != 9) + (A mod B + A),res = 31,count = 1] Gen 470 [program = (3 != ((B + 4) * B + 4) mod A) + (A + (A != B) * A),res = 31,count = 1] Gen 972 [program = (A - 10 != 1) + (A * (A != B) + A),res = 31,count = 1] */ data(partitions,Data,Vars,Unknown,Ops,Constants,MaxSize,Params) :- Seq = [1,1,2,3,5,7,11,15,22], N = 2, make_seq(Seq,N,Data,Unknown,Vars), % Ops = [*,+,-,/,mod,/\,\/,if_then_else,!=,==], Ops = [*,+,-,/,mod,if_then_else,!=,==], Constants = 0..10, Params = new_map([ init_size=1000, show_best=10, remove_dups=false ]), MaxSize = 21.