This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A383075 #27 May 26 2025 21:52:13 %S A383075 1,3,4,7,2,4,3,15,13,4,5,8,6,3,4,31,8,27,9,7,13,11,11,31,12,12,40,7, %T A383075 14,4,15,63,22,8,7,40,18,19,13,15,20,27,21,16,27,11,23,31,24,12,8,32, %U A383075 26,40,5,31,9,28,29,40,30,15,13,127,12,27,33,8,22,7,35 %N A383075 Smallest number m such that m*(m + 1)*(2*m + 1)/6 is divisible by n. %C A383075 m*(m + 1)*(2*m + 1)/6 is divisible by n if and only if m*(m + 1)*(2*m + 1) is divisible by 6*n. - _David A. Corneth_, Apr 21 2025 %C A383075 If n > 3 is a prime of the form (8*k + 3), then a(2*n) = n. - _Ctibor O. Zizka_, May 21 2025 %H A383075 David A. Corneth, <a href="/A383075/b383075.txt">Table of n, a(n) for n = 1..10000</a> %H A383075 David A. Corneth, <a href="/A383075/a383075.gp.txt">PARI program</a> %e A383075 n = 2: smallest m such that m*(m + 1)*(2*m + 1) is divisible by 2*6 is m = 3. %e A383075 a(4) = 7. The first few numbers of the form m*(m + 1)*(2*m + 1)/6, m >= 1 are 1, 5, 14, 30, 55, 91, 140,... The first 6 are not divisible by 4 but the seventh is. - _David A. Corneth_, Apr 21 2025 %t A383075 a[n_]:=Module[{m=1},While[!Divisible[m(m+1)(2m+1)/6,n], m++]; m]; Array[a,71] (* _Stefano Spezia_, Apr 15 2025 *) %o A383075 (PARI) a(n) = my(m=1); while (m*(m+1)*(2*m+1)/6 % n, m++); m; \\ _Michel Marcus_, Apr 20 2025 %o A383075 (PARI) \\ See Corneth link %o A383075 (Python) %o A383075 from itertools import count %o A383075 from sympy import integer_nthroot %o A383075 def A383075(n): return next(m for m in count(integer_nthroot(3*n,3)[0]) if not m*(m+1)*((m<<1)+1)%(6*n)) # _Chai Wah Wu_, Apr 21 2025 %Y A383075 Cf. A000330, A007520, A011772. %K A383075 nonn %O A383075 1,2 %A A383075 _Ctibor O. Zizka_, Apr 15 2025