cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

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.

Original entry on oeis.org

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, 168, 210, 90, 72, 16, 160, 60, 50, 225, 270, 27, 297, 33, 88, 11, 132, 231, 165, 264, 24, 54, 63, 36, 120, 75, 105, 189, 84, 462, 396, 108, 1404, 117, 65, 910, 273, 1001, 182, 13
Offset: 1

Views

Author

Keywords

Comments

It appears that this sequence is a permutation of the positive integers.
It appears that every positive rational except 1 occurs as the ratio of consecutive terms.
A218454 gives smallest numbers m such that a(m)=n; a(A176352(n))=n. - Reinhard Zumkeller, Oct 30 2012
A218535(n) = gcd(a(n),a(n+1)); A218533(n)/A218534(n) = a(n)/a(n+1). - Reinhard Zumkeller, Nov 10 2012

Examples

			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.
		

Crossrefs

This ordering of the rationals is A038566/A020653.
Cf. A002487.

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    import Data.List (delete)
    import Data.Set (singleton, insert, member)
    a176352 n = a176352_list !! (n-1)
    a176352_list = 1 : f 1 (singleton 1) (concat $ drop 2 $
       zipWith (zipWith (%)) a038566_tabf $ map reverse a038566_tabf)
       where f x ws qs = h qs
               where h (r:rs) | denominator y /= 1 || v `member` ws = h rs
                              | otherwise = v : f y (insert v ws) (delete r qs)
                              where v = numerator y; y = x * r
    -- Reinhard Zumkeller, Oct 30 2012
  • PARI
    copywo(v,k)=vector(#v-1,i,v[if(i#pend,pend=concat(pend,rprat(last++)));
    try=v[i-1]*pend[k];
    if(denominator(try)==1&!invecn(v,i-1,try),
    pend=copywo(pend,k);v[i]=try;break);
    k++));v}
    

Extensions

Definition stated more precisely by Reinhard Zumkeller, Oct 30 2012

A218533 Numerators of the ratios of consecutive terms in A176352.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 2, 5, 3, 3, 2, 1, 5, 5, 6, 1, 7, 2, 4, 3, 7, 1, 3, 4, 7, 5, 9, 1, 8, 6, 2, 5, 10, 1, 9, 3, 8, 1, 4, 7, 5, 11, 4, 6, 7, 3, 8, 5, 5, 9, 2, 7, 11, 1, 12, 9, 1, 10, 3, 11, 14, 1, 5, 13, 3, 13, 2, 11, 4, 13, 1, 8, 7, 13, 4, 11, 9, 7, 16, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 10 2012

Keywords

Comments

a(n) = numerator of A176352(n) / A176352(n+1).

Crossrefs

Cf. A218533 (denominator).

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a218533 n = a176352 n `div` a218535 n
    a218533_list = map numerator $ zipWith (%) a176352_list $ tail a176352_list

Formula

a(n) = A176352(n) / A218535(n).

A218534 Denominators of the ratios of consecutive terms in A176352.

Original entry on oeis.org

2, 3, 1, 4, 1, 5, 1, 6, 3, 1, 5, 2, 5, 7, 2, 3, 1, 8, 1, 7, 3, 7, 2, 9, 4, 5, 3, 4, 2, 10, 3, 5, 9, 6, 1, 11, 1, 8, 1, 12, 7, 5, 8, 1, 9, 7, 4, 10, 5, 7, 9, 4, 11, 6, 3, 13, 1, 5, 14, 3, 11, 2, 1, 15, 11, 2, 13, 1, 13, 4, 13, 3, 16, 7, 9, 4, 11, 6, 7, 8, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 10 2012

Keywords

Comments

a(n) = denominator of A176352(n) / A176352(n+1).

Crossrefs

Cf. A218533 (numerator).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a218534 n = a176352 (n + 1) `div` a218535 n
    a218534_list = map denominator $ zipWith (%) a176352_list $ tail a176352_list

Formula

a(n) = A176352(n+1) / A218535(n).
Showing 1-3 of 3 results.