↑ Produces 1, 2, 5, 7, 17, 31, 53, 71, 103, 131, 193, 251
Related sequences:
- https://oeis.org/A079848 (for pair-sums starting from 2)
- https://oeis.org/A256062 (for pair-sums) 1, 2, 5, 7, 17, 31, 39, 59, 99,
- https://oeis.org/A005282 (for pair-sums, non-primes)
- https://oeis.org/A060276 (for triple-sums)
- https://oeis.org/A103277 (triple-sums-products, non-unique though)
Some research from older unisons
/* Machinery to enable operators overloading */
// we handpick primes so that their sums uniquely identify expression (operators sequence)
// this way we can trace back which operands are
// Research reference: https://gist.github.com/dy/2253b859db4e2ab4993ffe6779c1a1b5
// https://oeis.org/A079848
// const IDS = [/*3, 5, 11, 23, 37,*/ /*47,*/ 97, 101, /*149,*/ 211, 233, 353, 383, 487, 641, /*757,*/ /*797,*/ 919, 1097, 1163, /*1381, 1409, 1481,*/ /*1777,*/ /*1997,*/ 2287, /*2417,*/ 2969, /*3049,*/ 3371, /*3529,*/ 3929, 4231, 4759, 5279, 5449, /*5717,*/ /*5953,*/ /*6529,*/ /*6983, 7583,*/ /*8053,*/ 8819, 9043]
// has many non-sum ops intersections
// can't start with 2 because that's the only case where sum/products intersect
// sum/dif matches:
// 3 + 5 = 11 - 3
// 37 - 3 = 11 + 23
// 5 + 37 = 47 - 5
// ...
// rational matches:
// (5717 + 3049) * .11(1) = 487 * 2
// (3929 + 3049) * .33(3) = 1163 * 2
// (5717 - 3929) * .16(6) = 149 * 2
// (2287 + 97) * .125 = 149 * 2
// (6529 - 4231) * .33(3) = 383 * 2
// (6529 + 1163) * .125 = 641 * 1.5
// 5449 - 211 = (97 * 99) * 6 / 11
// (2969 - 641) * .125 = (97 * 3)
// 3929 - 919 = (101 * 8) / .16
// (61 + 101) = (211 - 61) * 1.08
// ...
// https://oeis.org/A001333 - mysteriously generates unique results for seqs like ±a ± b ± c ± ...
// export const IDS = [ 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363 ]
// https://oeis.org/A000244 - even funnier, powers of 3 generate unique results for seqs ±a ± b ± c..., ±b ± c ± d...,
// a*b*c... moves order up, so safely detected
export const IDS = [ 1,3,9,27,81,243,729,2187,6561 ]
IDS.current = 0