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.

A255509 a(1)=1, a(2)=2, a(3)=3; for n>=4, a(n) is the maximal prime factor P_n of a(n-2) if P_n is not already a term, otherwise a(n) is the smallest not appeared earlier positive number x such that gcd(x,a(n-2))>1, gcd(x,a(n-1))=1.

This page as a plain text file.
%I A255509 #18 Oct 06 2018 11:46:36
%S A255509 1,2,3,4,9,8,15,14,5,7,10,21,16,27,20,33,25,11,30,77,6,35,12,49,18,91,
%T A255509 22,13,24,65,28,39,32,45,26,51,38,17,19,34,57,40,63,44,69,50,23,36,
%U A255509 115,42,55,46,75,52,81,56,87,62,29,31,58,93,64,99,68,105,74
%N A255509 a(1)=1, a(2)=2, a(3)=3; for n>=4, a(n) is the maximal prime factor P_n of a(n-2) if P_n is not already a term, otherwise a(n) is the smallest not appeared earlier positive number x such that gcd(x,a(n-2))>1, gcd(x,a(n-1))=1.
%C A255509 By definition, in contrast to A098550, in this sequence there is a priority for appearance of the primes.
%H A255509 Peter J. C. Moses, <a href="/A255509/b255509.txt">Table of n, a(n) for n = 1..1000</a>
%H A255509 David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, <a href="http://arxiv.org/abs/1501.01669">The Yellowstone Permutation</a>, arXiv preprint arXiv:1501.01669 [math.NT], 2015.
%t A255509 a[n_] := a[n] = If[n <= 3, n, Module[{p = FactorInteger[a[n-2]][[-1, 1]], aa = Array[a, n-1], x}, If[FreeQ[aa, p], Return[p], For[x = 4, True, x++, If[FreeQ[aa, x] && GCD[x, a[n-2]]>1 && GCD[x, a[n-1]]==1, Return[x]]]]]];
%t A255509 Array[a, 100] (* _Jean-François Alcover_, Oct 06 2018 *)
%Y A255509 Cf. A098550, A247225, A247942, A249167, A251604, A254077.
%K A255509 nonn
%O A255509 1,2
%A A255509 _Vladimir Shevelev_, Feb 24 2015
%E A255509 More terms from _Peter J. C. Moses_, Feb 24 2015