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.

A163643 a(0)=1. For n >= 1, a(n) is the smallest composite integer that is > a(n-1) and that is coprime to n.

Original entry on oeis.org

1, 4, 9, 10, 15, 16, 25, 26, 27, 28, 33, 34, 35, 36, 39, 44, 45, 46, 49, 50, 51, 52, 57, 58, 65, 66, 69, 70, 75, 76, 77, 78, 81, 82, 87, 88, 91, 92, 93, 94, 99, 100, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 133, 134, 135, 136, 141, 142, 143, 144, 145
Offset: 0

Views

Author

Leroy Quet, Aug 02 2009

Keywords

Crossrefs

Programs

  • Maple
    A163643 := proc(n) if n = 0 then 1; else for a from procname(n-1)+1 do if not isprime(a) then if gcd(a,n) = 1 then return a; end if; end if; end do: end if; end proc: seq(A163643(n),n=0..100) ; # R. J. Mathar, Oct 09 2010
  • Mathematica
    a = {4}; Do[k = a[[n]] + 1; While[Nand[CompositeQ@ k, ! MemberQ[a, k], CoprimeQ[k, n + 1]], k++]; AppendTo[a, k], {n, 61}]; {1}~Join~a (* Michael De Vlieger, Jul 23 2017 *)

Extensions

More terms from R. J. Mathar, Oct 09 2010