OFFSET
0,4
COMMENTS
In the terms studied a(n) = 1 if s(n) is 4 or a prime.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 2..2^14.
EXAMPLE
MATHEMATICA
nn = 120; s[0] = 1; s[1] = p = 2; s[2] = i = 4; s[3] = j = 6;
Do[If[PrimeQ[j/2],
k = Prime[p++],
k = If[PrimeQ[j], i, j] + 1; While[PrimeQ[k], k++]];
Set[{s[n], i, j}, {k, j, k}], {n, 4, nn}];
s = Array[s, nn];
{0}~Join~Table[Function[{m, w}, Count[w, _?(! CoprimeQ[#, m[[1]]] &)]] @@
TakeDrop[#, -1] &@ s[[;; n]], {n, nn}] (* Michael De Vlieger, Jun 23 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jun 23 2024
STATUS
approved