I was looking for a simple sequence that's not yet referenced on the OEIS and came up with this one(*):
- \$a_1=2\$
- \$a_2=3\$
- For \$n>2\$, \$a_n\$ is the smallest number of the form \$a_i\times a_j+1\$ (with \$1\le i\le j<n\$) that is not yet included in the sequence.
The first few terms are:
2 3 5 7 10 11 15 16 21 22 23 26 31 33 34 36 43 45 46 47 49 50 51 53 56 63 64 67 69 70 71 73 76 78 79 81 87 91 93 94 95 99
Your task is to output this sequence.
This is code-golf and standard sequence rules apply.
(*) As pointed out by ovs and Jonathan Allan, the OEIS does include two sequences in the same spirit: A009293 and A009388.
2x2+1
;i
andj
can be equal. \$\endgroup\$