OFFSET
1,2
COMMENTS
The average value of a(n) is n/(2 log n) + O(n log log n/log^2 n). - Charles R Greathouse IV, May 29 2014
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
a[n_] := If[PrimeQ[n] || n == 1, n, If[EvenQ[n], 2, 3] ]; Table[a[n], {n, 1, 25}] (* G. C. Greubel, Oct 26 2016 *)
PROG
(PARI) a(n)=if(isprime(n)||n==1, n, if(n%2, 3, 2)) \\ Charles R Greathouse IV, May 29 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Dec 01 2007
STATUS
approved