OFFSET
1,2
COMMENTS
Includes all prime numbers. Includes all even perfect numbers. Includes no power of 2 > 2. Includes no number of the form 2p where p is a prime number greater than 3.
43681 is the first term after 1 which would not be there if the inequality in the definition were strict (i.e., it is divisible by the sum of divisors <= sqrt(k), but not by the sum of those < sqrt(k)). - Ivan Neretin, Dec 21 2017
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
{k: A066839(k) | k}. - R. J. Mathar, Nov 02 2008
EXAMPLE
4 is not a term of this sequence because the divisors of 4 <= sqrt(4) are 1 and 2 and 1+2 = 3 and 3 is not a divisor of 4.
12 is in the sequence because the divisors of 12 <= sqrt(12) are 1, 2 and 3 and 1+2+3 = 6 is a divisor of 12. - Emeric Deutsch, Oct 27 2008
MAPLE
with(numtheory): a:=proc(n) local div, s, j: div:=divisors(n): s:=0: for j while div[j] <= evalf(sqrt(n)) do s:=s+div[j] end do: if type(n/s, integer) = true then n else end if end proc: 1, seq(a(n), n=2..250); # Emeric Deutsch, Oct 27 2008
A066839 := proc(n) local a, d ; a := 0 ; for d in numtheory[divisors](n) do if d^2 <= n then a := a+d ; fi; od: a ; end: A145739 := proc(n) option remember ; local a; if n = 1 then 1; else for a from procname(n-1)+1 do if a mod A066839(a) = 0 then RETURN(a) ; fi; od: fi; end: for n from 1 to 300 do printf("%d, ", A145739(n)) ; od: # R. J. Mathar, Nov 02 2008
MATHEMATICA
Select[Range[230], Divisible[#, Total@Take[d = Divisors[#], Ceiling[Length[d]/2]]] &] (* Ivan Neretin, Dec 21 2017 *)
PROG
(PARI) isok(n) = (n % sumdiv(n, d, d*(d^2<=n))) == 0; \\ Michel Marcus, Dec 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Lowell, Oct 17 2008
EXTENSIONS
More terms from R. J. Mathar and Emeric Deutsch, Nov 01 2008
STATUS
approved