OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n for all primes plus the integers {1, 4, 6}. - Robert G. Wilson v
EXAMPLE
There are four positive divisors of 15: (1,3,5,15). The smallest of these divisors that is >=4 is 5; so a(15) = 5.
MAPLE
with(numtheory): a:=proc(n) local dn, i: dn:=divisors(n): for i while dn[i] < tau(n) do end do: dn[i] end proc: seq(a(n), n=1..60); # Emeric Deutsch, Mar 17 2008
MATHEMATICA
f[n_] := First@Select[Divisors@n, # >= DivisorSigma[0, n] &]; Array[f, 81] (* Robert G. Wilson v *)
PROG
(PARI) a(n) = {my(d = divisors(n), nd = #d); for(i = 1, nd, if(d[i] >= nd, return(d[i]))); } \\ Amiram Eldar, Apr 15 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 06 2008
EXTENSIONS
STATUS
approved