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-4 of 4 results.

A064956 Inverse permutation to A064417.

Original entry on oeis.org

1, 2, 3, 7, 11, 4, 16, 8, 5, 12, 28, 6, 33, 17, 13, 9, 43, 14, 50, 10, 15, 29, 60, 19, 22, 34, 20, 18, 68, 21, 79, 25, 27, 44, 23, 26, 96, 51, 32, 24, 104, 37, 113, 30, 38, 61, 119, 31, 56, 39, 42, 35, 137, 48, 40, 36, 49, 69, 146, 41, 156, 80, 57, 46, 54, 58, 173, 45, 59, 55
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2001

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a064956 n = (fromJust $ elemIndex n a064417_list) + 1
    -- Reinhard Zumkeller, Nov 13 2011

Extensions

More terms from Naohiro Nomoto, Oct 31 2001

A169837 EKG sequence started at 3 instead of 2.

Original entry on oeis.org

3, 6, 2, 4, 8, 10, 5, 15, 9, 12, 14, 7, 21, 18, 16, 20, 22, 11, 33, 24, 26, 13, 39, 27, 30, 25, 35, 28, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 44, 46, 23, 69, 45, 48, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 72, 64, 68, 74, 37, 111, 75, 78, 76, 80, 82, 41
Offset: 1

Views

Author

T. D. Noe and N. J. A. Sloane, Jun 02 2010

Keywords

Comments

A generalization of A064413.
a(n) = A064413(n+1) for n > 43; a(n) = A169849(n) for n > 9. - Reinhard Zumkeller, Jul 04 2014

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a169837 n = a169837_list !! (n-1)
    a169837_list = 3 : ekg 3 (2 : [4..]) where
       ekg x zs = f zs where
           f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys
    -- Reinhard Zumkeller, Jul 04 2014

A169849 EKG sequence started at 9 instead of 2.

Original entry on oeis.org

9, 3, 6, 2, 4, 8, 10, 5, 15, 12, 14, 7, 21, 18, 16, 20, 22, 11, 33, 24, 26, 13, 39, 27, 30, 25, 35, 28, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 44, 46, 23, 69, 45, 48, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 72, 64, 68, 74, 37, 111, 75, 78, 76, 80, 82, 41
Offset: 1

Views

Author

T. D. Noe and N. J. A. Sloane, Jun 02 2010

Keywords

Comments

A generalization of A064413.
a(n) = A064413(n+1) for n > 43; a(n) = A169837(n) for n > 9. - Reinhard Zumkeller, Jul 04 2014

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a169849 n = a169849_list !! (n-1)
    a169849_list = 9 : ekg 9 (delete 9 [2..]) where
       ekg x zs = f zs where
           f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys
    -- Reinhard Zumkeller, Jul 04 2014

A177958 a(n) = n for n <= 6; for n > 6, a(n) is the smallest number not already used such that gcd(a(n), a(n-1)) >= 6.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 12, 18, 9, 27, 36, 24, 8, 16, 32, 40, 10, 20, 30, 15, 45, 54, 42, 7, 14, 21, 28, 35, 49, 56, 48, 60, 50, 25, 75, 90, 63, 70, 77, 11, 22, 33, 44, 55, 66, 72, 64, 80, 88, 96, 78, 13, 26, 39, 52, 65, 91, 84, 98, 105
Offset: 1

Views

Author

Jonathan Vos Post, Dec 16 2010

Keywords

Comments

A permutation of the natural numbers.

Crossrefs

Programs

  • Maple
    ina:= proc(n) evalb(n<7) end:
    a:= proc(n) option remember;
          local k;
          if n<7 then n
          else for k while ina(k) or igcd (k, a(n-1))<6 do od;
               ina(k):= true; k
          fi
        end;
    seq(a(n), n=1..60);
  • Mathematica
    t=Range[6]; Do[k=7; While[MemberQ[t, k] || GCD[t[[-1]], k] < 6, k++]; AppendTo[t, k], {n, 7, 100}]; t
  • Python
    from sympy import gcd
    l=list(range(1, 7))
    for n in range(6, 101):
        k=7
        while k in l or gcd(l[n - 1], k)<6: k+=1
        l.append(k)
    print(l) # Indranil Ghosh, Jun 27 2017

Extensions

Edited by Alois P. Heinz, Dec 16 2010
Showing 1-4 of 4 results.