

A139080


a(n) = the smallest positive integer not occurring earlier in the sequence such that floor(max(a(n),a(n1))/min(a(n),a(n1))) = 2; a(1) = 1.


3



1, 2, 4, 8, 3, 6, 12, 5, 10, 20, 7, 14, 28, 11, 22, 9, 18, 36, 13, 26, 52, 19, 38, 15, 30, 60, 21, 42, 16, 32, 64, 23, 46, 17, 34, 68, 24, 48, 96, 33, 66, 25, 50, 100, 35, 70, 27, 54, 108, 37, 74, 29, 58, 116, 39, 78, 31, 62, 124, 43, 86, 40, 80, 160, 55, 110, 41, 82, 164, 56
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Is there always an unused positive integer, a(n), such that floor(max(a(n),a(n1))/min(a(n),a(n1))) = 2, or does the sequence terminate? If the sequence is infinite, is it a permutation of the positive integers?
The sequence grows in 5 distinct "bands" which are populated respectively by every 5th term; these terms are in proportion (a(5k), a(5k+1), a(5k+2), a(5k+3), a(5k+4)) ~ (4, 8, 3, 6, 12)*k*(1O(1/log(k))). More precisely, for k>6, we have a(5k+1) = 2 a(5k), a(5k+2) ~ (3/8)*a(5k+1) is the least number not occurring earlier, a(5k+3) = 2 a(5k+2), a(5k+4) = 2 a(5k+3) and a(5k+5) is the least number greater than a(5k+4)/3 not occurring earlier.  M. F. Hasler, Apr 24 2015
See LINKS for a proof of the preceding statement, which provides an affirmative answer to the questions raised in the first comment. See A257280 for the inverse permutation. See also the variant A257470 and its inverse A257271.  M. F. Hasler, Apr 26 2015


LINKS

M. F. Hasler, Table of n, a(n) for n=1,...,10000.
M. F. Hasler, A139080, OEIS wiki, April 2015.


FORMULA

For k>6, when n = 5k, 5k+2 or 5k+3, then a(n+1) = 2 a(n); and with N(n) := N \ {a(k); k < n}, a(5k+2) = min N(5k+2) and a(5k+5) = min { m in N(5k+5), m > a(5k+4)/3 }.  M. F. Hasler, Apr 26 2015


MATHEMATICA

f[n_] := Block[{s = {1}, i, k}, For[i = 2, i <= n, i++, k = 1; While[Nand[! MemberQ[s, k], Floor[Max[k, s[[i  1]]]/Min[k, s[[i  1]]]] == 2], k++]; AppendTo[s, k]]; s]; f@ 70 (* Michael De Vlieger, Apr 26 2015 *)


PROG

(PARI) { t=0; last=1; for( n=1, 10000, write("b139080.txt", n, " ", last); t+=1<<last; for( i=last\3+1, last\2, bittest(t, i) & next; last=i; next(2)); for( i=last*2, last*31, bittest(t, i) & next; last=i; next(2)); error("THE END: n=", n)); print("Largest term used:"); log(t)\log(2)} \\ M. F. Hasler, Apr 07 2008
(Haskell)
import Data.List (delete)
a139080 n = a139080_list !! (n1)
a139080_list = 1 : f 1 [2..] where
f x zs = g zs where
g (y:ys) = if x < y && y `div` x == 2  x `div` y == 2
then y : f y (delete y zs) else g ys
 Reinhard Zumkeller, Mar 14 2014


CROSSREFS

Cf. A257280 (inverse), A257470, A257271.
Sequence in context: A341993 A232645 A257470 * A036118 A247555 A340730
Adjacent sequences: A139077 A139078 A139079 * A139081 A139082 A139083


KEYWORD

nonn,look


AUTHOR

Leroy Quet, Apr 07 2008


EXTENSIONS

Additional terms calculated by Robert Israel and M. F. Hasler, Apr 11 2008


STATUS

approved



