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

A064958 Inverse permutation to A064418.

Original entry on oeis.org

1, 2, 3, 4, 14, 7, 21, 5, 9, 15, 28, 6, 38, 22, 16, 12, 51, 8, 58, 13, 23, 29, 68, 19, 17, 39, 10, 20, 85, 18, 104, 26, 30, 52, 24, 11, 114, 59, 40, 25, 131, 35, 143, 27, 32, 69, 154, 36, 43, 33, 53, 37, 168, 46, 31, 44, 60, 86, 190, 34, 198, 105, 45, 49, 41, 47, 212, 50
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2001

Keywords

Crossrefs

Extensions

More terms from Naohiro Nomoto, Oct 31 2001

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