login
A350315
Length of the rows of the Redstone permutation A350313.
2
2, 3, 6, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 12, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 12, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4, 6, 6, 6, 8, 4
OFFSET
1,1
COMMENTS
See the comments and the example section of A350313 for definitions.
FORMULA
Apparently for n >= 4: a(n) = 2 * b(n - 4) + 6, where the generating function of b(n) is (-3*x^33 + x^29 - x^28 + x^24 - x^23 + x^19 - x^18 + x^14 - x^13 + x^9 - x^8 + x^4 - x^3)/(x^34 - 1).
MATHEMATICA
s = {2, 1}; c[_] = 0; Array[Set[c[s[[#]]], #] &, Length[s]]; j = Last[s]; u = 3; Prepend[Differences[#], First[#]] &[{2}~Join~Reap[Monitor[Do[If[j == u, While[c[u] > 0, u++]]; k = u; While[Nand[c[k] == 0, CoprimeQ[i, k], ! Divisible[i - 1, k]], k++]; If[k == u, Sow[i]]; Set[c[k], i]; j = k, {i, Length[s] + 1, 500}], i]][[-1, -1]]] (* Michael De Vlieger, Dec 24 2021 *)
CROSSREFS
Sequence in context: A151850 A290223 A274213 * A078706 A077082 A333936
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 24 2021
STATUS
approved