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.

A163642 a(n) = the smallest composite positive integer that is not yet in the sequence and that is coprime to n.

Original entry on oeis.org

4, 9, 8, 15, 6, 25, 10, 21, 14, 27, 12, 35, 16, 33, 22, 39, 18, 49, 20, 51, 26, 45, 24, 55, 28, 57, 32, 65, 30, 77, 34, 63, 38, 69, 36, 85, 40, 75, 44, 81, 42, 95, 46, 87, 52, 91, 48, 115, 50, 93, 56, 99, 54, 119, 58, 111, 62, 105, 60, 121, 64, 117, 68, 123, 66, 125, 70, 129, 74
Offset: 1

Views

Author

Leroy Quet, Aug 02 2009

Keywords

Comments

This sequence is a permutation of the composite positive integers.
Indices of composites: {1, 4, 3, 8, 2, 15, 5, 12, 7, 17, 6, 23, 9, 21, 13, 26, 10, 33, 11, 35, 16, 30, 14, 38, 18, 40, 20, 46, ...}. - Michael De Vlieger, Jul 23 2017
Each composite k occurs in the sequence no later than a(k-1). Proof by induction. - Peter Munn, Sep 01 2017

Crossrefs

Programs

  • Mathematica
    a = {4}; Do[k = 6; While[Nand[CompositeQ@ k, ! MemberQ[a, k], CoprimeQ[k, n]], k++]; AppendTo[a, k], {n, 2, 69}]; a (* Michael De Vlieger, Jul 23 2017 *)

Extensions

More terms from Sean A. Irvine, Nov 11 2009