login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
4
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,2
LINKS
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Aug 02 2009
EXTENSIONS
More terms from R. J. Mathar, Oct 09 2010
STATUS
approved