login
A361503
a(1)=2; thereafter a(n) = smallest prime that does not divide b(n-1)*b(n), where b(k) = A359804(k).
5
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,1
COMMENTS
Understanding this sequence is the key to analyzing A359804.
LINKS
EXAMPLE
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.
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 *)
CROSSREFS
Sequence in context: A232931 A060084 A374155 * A265668 A273087 A236434
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 18 2023
STATUS
approved