login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247942 a(n) = n if n <= 3, otherwise the smallest number not occurring earlier having at least one common factor with a(n-2)*a(n-3), but none with a(n-1). 5
1, 2, 3, 4, 9, 8, 15, 14, 5, 6, 7, 10, 21, 16, 25, 12, 35, 18, 49, 20, 27, 22, 39, 11, 13, 24, 55, 26, 33, 28, 45, 32, 51, 38, 17, 19, 30, 119, 36, 65, 34, 57, 40, 63, 44, 69, 50, 23, 42, 85, 46, 75, 52, 81, 56, 87, 62, 29, 31, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The sequence differs from A098550 from a(11) onward.

The sequence is a permutation of the natural numbers. The proof is similar to that for A098550 (with minor changes). - Vladimir Shevelev, Jan 14 2015

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669, 2015.

MAPLE

for n from 1 to 3 do

  a[n]:= n:

  b[n]:= 1:

od:

for n from 4 to 1000 do

    q:= a[n-2]*a[n-3];

    for k from 4 do

      if not assigned(b[k]) and igcd(k, q) > 1 and igcd(k, a[n-1]) = 1 then

         a[n]:= k;

         b[k]:= 1;

         break

      fi

   od:

od:

seq(a[i], i=1..1000); # Robert Israel, Jan 12 2015

MATHEMATICA

a[n_ /; n <= 3] := n; a[n_] := a[n] = For[aa = Table[a[j], {j, 1, n-1}]; k=4, True, k++, If[FreeQ[aa, k] && !CoprimeQ[k, a[n-2]*a[n-3]] && CoprimeQ[k, a[n-1]], Return[k]]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jan 12 2015 *)

CROSSREFS

Cf. A098550, A249167, A251604, A247225.

Sequence in context: A115305 A210747 A329425 * A098550 A256224 A255509

Adjacent sequences:  A247939 A247940 A247941 * A247943 A247944 A247945

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Jan 11 2015

EXTENSIONS

More terms from Jean-François Alcover, Jan 12 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 23:10 EDT 2020. Contains 337274 sequences. (Running on oeis4.)