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.

A257405 For n=1 or prime, a(n)=n; otherwise, a(n) is the smallest number not already used which shares a factor with a(n-1).

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 7, 14, 4, 8, 11, 22, 13, 26, 12, 9, 17, 34, 19, 38, 16, 18, 23, 46, 20, 15, 21, 24, 29, 58, 31, 62, 28, 30, 25, 35, 37, 74, 32, 36, 41, 82, 43, 86, 40, 42, 47, 94, 44, 33, 27, 39, 53, 106, 48, 45, 50, 52, 59, 118, 61, 122, 54, 51, 57, 60, 67
Offset: 1

Views

Author

Vladimir Shevelev, Apr 22 2015

Keywords

Comments

Since limsup(prime(n)) is infinity, it is easy to see that the sequence contains all even numbers. So it is natural to conjecture that the sequence is a permutation of the positive integers.

Crossrefs

Programs

  • Mathematica
    seq={1};Do[cmplSeq=Complement[Range[2*Max[seq]],seq];
    If[PrimeQ[n],AppendTo[seq,n],AppendTo[seq,Min[Select[cmplSeq,GCD[Last[seq],#]>1&]]]],{n,2,100}];seq (* Ivan N. Ianakiev, Apr 25 2015 *)

Extensions

More terms from Peter J. C. Moses, Apr 22 2015