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 A011772 #96 Feb 16 2025 08:32:32 %S A011772 1,3,2,7,4,3,6,15,8,4,10,8,12,7,5,31,16,8,18,15,6,11,22,15,24,12,26,7, %T A011772 28,15,30,63,11,16,14,8,36,19,12,15,40,20,42,32,9,23,46,32,48,24,17, %U A011772 39,52,27,10,48,18,28,58,15,60,31,27,127,25,11,66,16,23,20,70,63,72,36,24 %N A011772 Smallest number m such that m(m+1)/2 is divisible by n. %C A011772 The graph of the function is split into rays of which the densest ones are y(n) = n-1 = a(n) iff n is an odd prime power, and y(n) = n/2 = a(n) or a(n)+1 if n = 8k-2 (except for k = 9, 10, 14, 16, 19, 24, ...) or 8k+2 (except for k = 8, 11, 16, 17, 19, 26, 33, ...). The next most-frequent rays are similar: y(n) = n/r for r = 3, 4, 5, ... and r = 4/3, etc. - _M. F. Hasler_, May 30 2021 %H A011772 Alois P. Heinz, <a href="/A011772/b011772.txt">Table of n, a(n) for n = 1..16383</a> (first 1000 terms from T. D. Noe) %H A011772 C. Ashbacher, <a href="https://archive.org/details/ThePseudoSmarandacheFunctionNumberTheory">The Pseudo-Smarandache Function and the Classical Functions of Number Theory</a>, Smarandache Notions Journal, Vol. 9, No. 1-2, 1998, 79-82. %H A011772 Jason Earls, <a href="https://www.researchgate.net/publication/262314336_The_Smarandache_sum_of_composites_between_factors_function">The Smarandache sum of composites between factors function</a>, in Smarandache Notions Journal (2004), Vol. 14.1, page 246. %H A011772 K. Kashihara, <a href="http://www.gallup.unm.edu/~smarandache/Kashihara.pdf">Comments and Topics on Smarandache Notions and Problems</a>, Erhus University Press, 1996, 50 pages. See p. 35. %H A011772 K. Kashihara, <a href="/A011772/a011772.pdf">Comments and Topics on Smarandache Notions and Problems</a>, Erhus University Press, 1996, 50 pages. [Cached copy] See p. 35. %H A011772 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PseudosmarandacheFunction.html">Pseudosmarandache Function</a> %F A011772 A000217(a(n)) = A066561(n). %F A011772 a(2^k) = 2^(k+1)-1; a(m) = m-1 for odd prime powers m. - _Reinhard Zumkeller_, Feb 26 2003 %F A011772 a(n) <= 2n-1 for all numbers n; a(n) <= n-1 for odd n. - _Stefan Steinerberger_, Apr 03 2006 %F A011772 a(n) >= (sqrt(8n+1)-1)/2 for all n. - _Charles R Greathouse IV_, Jun 25 2017 %F A011772 a(n) < n-1 for all n except the prime powers where a(n) = n-1 (n odd) or 2n-1 (n = 2^k). - _M. F. Hasler_, May 30 2021 %F A011772 a(n) = A344005(2*n). - _N. J. A. Sloane_, Jul 06 2021 %F A011772 a(n) = 2*n-1 iff n is a power of 2. - _Shu Shang_, Aug 01 2022 %t A011772 Table[m := 1; While[Not[IntegerQ[(m*(m + 1))/(2n)]], m++ ]; m, {n, 1, 90}] (* _Stefan Steinerberger_, Apr 03 2006 *) %t A011772 (Sqrt[1+8#]-1)/2&/@Flatten[With[{r=Accumulate[Range[300]]},Table[ Select[r, Divisible[#,n]&,1],{n,80}]]] (* _Harvey P. Dale_, Feb 05 2012 *) %o A011772 (Haskell) %o A011772 import Data.List (findIndex) %o A011772 import Data.Maybe (fromJust) %o A011772 a011772 n = (+ 1) $ fromJust $ %o A011772 findIndex ((== 0) . (`mod` n)) $ tail a000217_list %o A011772 -- _Reinhard Zumkeller_, Mar 23 2013 %o A011772 (PARI) a(n)=if(n==1,return(1)); my(f=factor(if(n%2,n,2*n)), step=vecmax(vector(#f~, i, f[i,1]^f[i,2]))); forstep(m=step,2*n,step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))) \\ _Charles R Greathouse IV_, Jun 25 2017 %o A011772 (Python) %o A011772 from math import isqrt %o A011772 def A011772(n): %o A011772 m = (isqrt(8*n+1)-1)//2 %o A011772 while (m*(m+1)) % (2*n): %o A011772 m += 1 %o A011772 return m # _Chai Wah Wu_, May 30 2021 %Y A011772 Cf. A000217, A066561. %Y A011772 Cf. A343995, A343996, A343997, A343998, A345984 (partial sums). %Y A011772 Cf. also A080982, A344005. %K A011772 nonn,easy,look,nice %O A011772 1,2 %A A011772 Kenichiro Kashihara (Univxiq(AT)aol.com) %E A011772 More terms from _Stefan Steinerberger_, Apr 03 2006