login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A251558 a(n) = smallest odd number not in {A098550(1), A098550(2), ..., A098550(n)} which is neither a prime nor a term of A251542. 4

%I #31 May 09 2021 02:28:40

%S 9,9,9,9,15,15,21,21,21,21,21,21,21,21,21,21,27,27,33,33,33,33,33,45,

%T 45,49,49,49,49,49,49,49,49,49,49,49,49,49,49,57,57,57,57,57,57,57,69,

%U 69,75,75,75,75,75,75,77,77,77,77,77,77,77,77,77,77,77,77,77,105,105,105

%N a(n) = smallest odd number not in {A098550(1), A098550(2), ..., A098550(n)} which is neither a prime nor a term of A251542.

%H Reinhard Zumkeller, <a href="/A251558/b251558.txt">Table of n, a(n) for n = 1..10000</a>

%H 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 and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Sloane/sloane9.html">J. Int. Seq. 18 (2015) 15.6.7</a>.

%t terms = 70; max = 2 terms;

%t f[lst_] := Block[{k = 4}, While[GCD[lst[[-2]], k] == 1 || GCD[lst[[-1]], k] > 1 || MemberQ[lst, k], k++]; Append[lst, k]];

%t A098550 = Nest[f, {1, 2, 3}, max-3];

%t sel = Select[Transpose[{Range[max], A098550}], PrimeQ[#[[2]]]&][[All,1]]+2;

%t A251542 = A098550[[sel]]/A098550[[sel-2]] ;

%t a[n_] := For[k = 1, k <= max, k = k+2, If[CompositeQ[k] && FreeQ[A098550[[1 ;; n]], k] && FreeQ[A251542, k], Return[k]]];

%t Table[a[n], {n, 1, terms}] (* _Jean-François Alcover_, Dec 06 2018, after _Robert G. Wilson v_ in A098550 *)

%o (Haskell)

%o import Data.List (delete); import Data.List.Ordered (minus)

%o a251558 n = a251558_list !! (n-1)

%o a251558_list = 9 : 9 : 9 : f 2 3 [4..] (tail a014076_list) where

%o f u v ws zs = g ws where

%o g (x:xs) = if gcd x u > 1 && gcd x v == 1

%o then y : f v x (delete x ws) ys else g xs

%o where ys@(y:_) = zs `minus` [x]

%o -- _Reinhard Zumkeller_, Mar 11 2015

%Y Cf. A098550, A251542, A251546, A251557, A251559.

%Y Cf. A014076.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Dec 23 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)