A361503 a(1)=2; thereafter a(n) = smallest prime that does not divide b(n-1)*b(n), where b(k) = A359804(k).
2, 3, 5, 2, 3, 5, 7, 3, 2, 5, 7, 11, 3, 5, 7, 11, 5, 3, 7, 5, 11, 7, 2, 3, 5, 7, 11, 5, 7, 2, 3, 5, 7, 3, 5, 7, 2, 5, 7, 11, 13, 5, 2, 3, 5, 2, 7, 3, 5, 7, 11, 5, 3, 2, 5, 7, 11, 2, 5, 3, 7, 5, 3, 7, 2, 11, 3, 7, 5, 3, 7, 5, 11, 7, 5, 11, 7, 5, 3, 7, 11, 3, 2, 5, 7, 2, 5, 3, 2, 5, 7, 13, 3, 5, 2, 3
Offset: 1
Keywords
Examples
b(1)=1, b(2)=2, b(3)=3, b(4)=5, so a(2) = smallest prime not dividing 2, which is 3. a(3) = smallest prime not dividing 2*3, which is 5, and a(4) = smallest prime not dividing 3*5, which is 2.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16383
Programs
-
Mathematica
nn = 120; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; Set[{i, j}, {a[1], a[2]}]; u = 3; {2}~Join~Reap[Do[ (k = q[#]; While[c[k #], k++]; k *= #; While[c[# q[#]], q[#]++]) &[(p = 2; While[Divisible[i j, p], p = NextPrime[p]]; p)]; Sow[p]; Set[{a[n], c[k], i, j}, {k, True, j, k}]; If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, -1]] (* Michael De Vlieger, Mar 18 2023 *)
Comments