A382485 a(n) = ceiling(n/d^2) where d is the largest divisor of n which is not greater than the square root of n.
1, 2, 3, 1, 5, 2, 7, 2, 1, 3, 11, 2, 13, 4, 2, 1, 17, 2, 19, 2, 3, 6, 23, 2, 1, 7, 3, 2, 29, 2, 31, 2, 4, 9, 2, 1, 37, 10, 5, 2, 41, 2, 43, 3, 2, 12, 47, 2, 1, 2, 6, 4, 53, 2, 3, 2, 7, 15, 59, 2, 61, 16, 2, 1, 3, 2, 67, 5, 8, 2, 71, 2, 73, 19, 3, 5, 2, 3, 79, 2, 1, 21, 83, 2, 4, 22, 10, 2, 89
Offset: 1
Examples
a(12)=2 because the largest factor of 12, which is not greater than sqrt(12), is 3; and ceiling(12/3^2)=2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Clive Tooth, [Sum_{i=2..n} a(i)]/[Sum_{i=2..n} i/log(i)] for n=10^7 to 10^9
Programs
-
Maple
f:= proc(n) local d; d:= max(select(t -> t^2 <= n, numtheory:-divisors(n))); ceil(n/d^2) end proc: map(f, [$1..100]); # Robert Israel, Apr 30 2025
-
Mathematica
a[n_]:=Ceiling[n/(Select[Divisors[n],#<=Sqrt[n]&][[-1]])^2];Array[a,89] (* James C. McMahon, Apr 07 2025 *)
-
PARI
a(n) = my(d=divisors(n)); ceil(n/d[(length(d)+1)\2]^2); \\ Michel Marcus, Apr 07 2025
Comments