OFFSET
1,4
COMMENTS
From Robert Israel, May 28 2015: (Start)
a(p^m) = p^floor(m/2) if p is prime.
a(p*q) = p if p < q are primes.
a(n) >= A033676(n). (End)
First differs from A034880 at a(24). - Sean A. Irvine, Sep 10 2020
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
Each of the four numbers 4, 6, 8, and 12 has common divisor with 12 which is no less than four. But there are no five such numbers among [1..12]. Hence a(12)=4.
MAPLE
f:= n -> nops(select(`>=`, sort(map(igcd, [$1..n], n), `>`)-[$1..n], 0)):
map(f, [$1..100]); # Robert Israel, May 28 2015
MATHEMATICA
f[n_] := Count[Reverse[Sort[GCD[Range[n], n]]] - Range[n], x_ /; x >= 0]; Table[f[n], {n, 84}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivan Neretin, May 15 2015
STATUS
approved