cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A350315 Length of the rows of the Redstone permutation A350313.

This page as a plain text file.
%I A350315 #8 Dec 25 2021 06:43:09
%S A350315 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,
%T A350315 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,
%U A350315 6,6,12,6,6,6,8,4,6,6,6,8,4,6,6,6,8,4
%N A350315 Length of the rows of the Redstone permutation A350313.
%C A350315 See the comments and the example section of A350313 for definitions.
%F A350315 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).
%t A350315 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 *)
%Y A350315 Cf. A350313, A350314.
%K A350315 nonn
%O A350315 1,1
%A A350315 _Peter Luschny_, Dec 24 2021