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!)
A176352 Order the positive rationals by numerator+denominator, then by numerator. a(n+1) = a(n)*r, where r is the first unused positive rational that makes a(n+1) an integer not already in the sequence. 5

%I #9 Jul 13 2013 12:03:42

%S 1,2,6,3,12,4,20,5,30,45,9,15,10,25,175,70,42,7,56,8,28,21,49,14,126,

%T 168,210,90,72,16,160,60,50,225,270,27,297,33,88,11,132,231,165,264,

%U 24,54,63,36,120,75,105,189,84,462,396,108,1404,117,65,910,273,1001,182,13

%N Order the positive rationals by numerator+denominator, then by numerator. a(n+1) = a(n)*r, where r is the first unused positive rational that makes a(n+1) an integer not already in the sequence.

%C It appears that this sequence is a permutation of the positive integers.

%C It appears that every positive rational except 1 occurs as the ratio of consecutive terms.

%C A218454 gives smallest numbers m such that a(m)=n; a(A176352(n))=n. - _Reinhard Zumkeller_, Oct 30 2012

%C A218535(n) = gcd(a(n),a(n+1)); A218533(n)/A218534(n) = a(n)/a(n+1). - _Reinhard Zumkeller_, Nov 10 2012

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

%e After a(6)=4, we have used ratios 1/2, 2, 1/3, and 3. 1/4 would give 1, which is already used. 2/3 would give 8/3, not an integer; 3/2 would give 6, already used; and ratio 4 is already used. 1/5 would not produce an integer; next is 5, giving a(7) = 4*5 = 20.

%o (PARI) copywo(v,k)=vector(#v-1,i,v[if(i<k,i,i+1)])

%o rprat(n)=local(v,i);v=vector(eulerphi(n));i=0;for(k=1,n,if(gcd(k,n)==1,v[i++ ]=k/(n-k)));v

%o invecn(v,n,x)=for(k=1,n,if(v[k]==x,return(1)));0

%o al(n)={local(v,pend,last,k,try);

%o v=vector(n);v[1]=1;pend=[];last=2;

%o for(i=2,n,

%o k=1;while(1,

%o if(k>#pend,pend=concat(pend,rprat(last++)));

%o try=v[i-1]*pend[k];

%o if(denominator(try)==1&!invecn(v,i-1,try),

%o pend=copywo(pend,k);v[i]=try;break);

%o k++));v}

%o (Haskell)

%o import Data.Ratio ((%), numerator, denominator)

%o import Data.List (delete)

%o import Data.Set (singleton, insert, member)

%o a176352 n = a176352_list !! (n-1)

%o a176352_list = 1 : f 1 (singleton 1) (concat $ drop 2 $

%o zipWith (zipWith (%)) a038566_tabf $ map reverse a038566_tabf)

%o where f x ws qs = h qs

%o where h (r:rs) | denominator y /= 1 || v `member` ws = h rs

%o | otherwise = v : f y (insert v ws) (delete r qs)

%o where v = numerator y; y = x * r

%o -- _Reinhard Zumkeller_, Oct 30 2012

%Y This ordering of the rationals is A038566/A020653.

%Y Cf. A002487.

%K nice,nonn

%O 1,2

%A _Franklin T. Adams-Watters_, Apr 15 2010

%E Definition stated more precisely by _Reinhard Zumkeller_, Oct 30 2012

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 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)