A113523 a(n) = largest composite nonnegative integer <= n.
0, 0, 0, 4, 4, 6, 6, 8, 9, 10, 10, 12, 12, 14, 15, 16, 16, 18, 18, 20, 21, 22, 22, 24, 25, 26, 27, 28, 28, 30, 30, 32, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 49, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 64, 65, 66, 66, 68, 69, 70, 70, 72
Offset: 1
Keywords
Programs
-
Mathematica
nnci[n_]:=Module[{k=0},While[PrimeQ[n-k],k++];n-k]/.{1->0}; Array[nnci,80] (* Harvey P. Dale, Jul 19 2012 *)
Formula
a(1)=a(2)=a(3) = 0. For n >= 4, a(n) = A014684(n).
Comments