

A251413


a(n) = 2n1 if n <= 3, otherwise the smallest odd number not occurring earlier having at least one common factor with a(n2), but none with a(n1).


3



1, 3, 5, 9, 25, 21, 55, 7, 11, 35, 33, 49, 15, 77, 27, 91, 45, 13, 51, 65, 17, 39, 85, 57, 115, 19, 23, 95, 69, 125, 63, 145, 81, 29, 75, 203, 93, 119, 31, 105, 341, 87, 121, 111, 143, 37, 99, 185, 117, 155, 123, 175, 41, 133
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Conjecture 1: Sequence is a permutation of the odd numbers.
Conjecture 2: The odd primes occur in the sequence in their natural order.
Comments from N. J. A. Sloane, Dec 13 2014: (Start)
The following properties are known (the proofs are analogous to the proofs for the corresponding facts about A098550).
1. The sequence is infinite.
2. At least onethird of the terms are composite.
3. For any odd prime p, there is a term that is divisible by p.
4. Let a(n_p) be the first term that is divisible by p. Then a(n_p) = q*p where q is an odd prime less than p. If p < r are primes then n_p < n_r.
(End)


REFERENCES

L. Edson Jeffery, Posting to Sequence Fans Mailing List, Dec 01 2014


LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..11945
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 and J. Int. Seq. 18 (2015) 15.6.7.


MAPLE

N:= 10^3: # to get a(1) to a(n) where a(n+1) is the first term > N
B:= Vector(N, datatype=integer[4]):
for n from 1 to 3 do A[n]:= 2*n1: od:
for n from 4 do
for k from 4 to N do
if B[k] = 0 and igcd(2*k1, A[n1]) = 1 and igcd(2*k1, A[n2]) > 1 then
A[n]:= 2*k1;
B[k]:= 1;
break
fi
od:
if 2*k1 > N then break fi
od:
seq(A[i], i=1..n1); # Based on Robert Israel's program for A098550


MATHEMATICA

max = 54; f = True; a = {1, 3, 5}; NN = Range[4, 1000]; s = 2*NN  1; While[TrueQ[f], For[k = 1, k <= Length[s], k++, If[Length[a] < max, If[GCD[a[[1]], s[[k]]] == 1 && GCD[a[[2]], s[[k]]] > 1, a = Append[a, s[[k]]]; s = Delete[s, k]; k = 0; Break], f = False]]]; a (* L. Edson Jeffery, Dec 02 2014 *)


PROG

(Python)
from fractions import gcd
A251413_list, l1, l2, s, b = [1, 3, 5], 5, 3, 7, {}
for _ in range(1, 10**4):
....i = s
....while True:
........if not i in b and gcd(i, l1) == 1 and gcd(i, l2) > 1:
............A251413_list.append(i)
............l2, l1, b[i] = l1, i, True
............while s in b:
................b.pop(s)
................s += 2
............break
........i += 2 # Chai Wah Wu, Dec 07 2014
(Haskell)
import Data.List (delete)
a251413 n = a251413_list !! (n1)
a251413_list = 1 : 3 : 5 : f 3 5 [7, 9 ..] where
f u v ws = g ws where
g (x:xs) = if gcd x u > 1 && gcd x v == 1
then x : f v x (delete x ws) else g xs
 Reinhard Zumkeller, Dec 25 2014


CROSSREFS

Cf. A098550, A251414.
Sequence in context: A262483 A083366 A006722 * A039774 A114001 A171879
Adjacent sequences: A251410 A251411 A251412 * A251414 A251415 A251416


KEYWORD

nonn,changed


AUTHOR

N. J. A. Sloane, Dec 02 2014


STATUS

approved



