VOOZH about

URL: https://oeis.org/A383972

⇱ A383972 - OEIS


login
A383972
Smallest number m such that (m*(m + 1)/2)^2 is divisible by n.
2
1, 3, 2, 3, 4, 3, 6, 7, 2, 4, 10, 3, 12, 7, 5, 7, 16, 3, 18, 4, 6, 11, 22, 8, 4, 12, 8, 7, 28, 15, 30, 15, 11, 16, 14, 3, 36, 19, 12, 15, 40, 20, 42, 11, 5, 23, 46, 8, 6, 4, 17, 12, 52, 8, 10, 7, 18, 28, 58, 15, 60, 31, 6, 15, 25, 11, 66, 16, 23, 20, 70, 8, 72, 36, 5, 19, 21, 12, 78
OFFSET
1,2
COMMENTS
(m*(m + 1))^2 must be divisible by 4*n.
A011772: If m >= n, then n = 2^k. If m = n - 1, then n is a power of an odd prime. If m = n/2, then n is a prime of the form 4*k + 3.
this sequence: If m >= n, then n = 1 or n = 2. If m = n - 1, then n is an odd prime (Comment R. Israel). If m = n/2, then n = 2*p, p prime of the form 4*k + 3.
A383075: If m >= n, then n = 2^i or n = 3^j or n = 2^r * 3^s for some r, s. If m = n/2, then n = 2*p, p prime of the form 8*k + 3.
If n is an odd prime, a(n) = n-1. - Robert Israel, May 18 2025
LINKS
EXAMPLE
n = 2: smallest m such that (m*(m + 1))^2 is divisible by 4*2 is m = 3.
The first few numbers of the form (m*(m + 1))^2 / (4*n), m >= 1 are 1, 18, 3, 9, 20, 6, 63, ...
MAPLE
f:= proc(n) local x, R;
R:= map(t -> rhs(op(t)), [msolve((x*(x+1))^2=0, 4*n)]);
min(subs(0=4*n, R))
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, May 18 2025
MATHEMATICA
a[n_] := Module[{m = 1}, While[PowerMod[m*(m + 1)/2, 2, n] > 0, m++]; m]; Array[a, 100] (* Amiram Eldar, May 17 2025 *)
PROG
(PARI) a(n) = my(m=1); while (Mod(m*(m+1)/2, n)^2, m++); m; \\ Michel Marcus, May 16 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, May 16 2025
STATUS
approved