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 A362532 #28 May 08 2023 10:19:47 %S A362532 2,4,8,8,24,24,72,144,144,144,384,384,2160,2160,2160,6720,54240,57600, %T A362532 131040,131040,131040,131040,612000,612000,612000,612000,612000, %U A362532 776160,776160,776160,6219360,23184000,28627200,28627200,28627200,28627200,28627200 %N A362532 The smallest positive integer m such that m mod 2k < k for k = 1, 2, 3, ..., n. %C A362532 Take the square array A(k, l) with k = 1, 2, ... and l = 0, 1, ... such that for each k, A(k, l) takes k zeros and then k ones alternately: %C A362532 0, 1, 0, 1, 0, 1, 0, 1, ... %C A362532 0, 0, 1, 1, 0, 0, 1, 1, ... %C A362532 0, 0, 0, 1, 1, 1, 0, 0, ... %C A362532 ... %C A362532 Then the a(n)-th column is the first column which begins with n zeros except the 0th column. %H A362532 Charles R Greathouse IV, <a href="/A362532/b362532.txt">Table of n, a(n) for n = 1..136</a> %H A362532 Tomohiro Yamada, <a href="/A362532/a362532.py.txt">Fast python program</a>, the original program written by nazratt2. %F A362532 Trivial bounds: a(n-1) <= a(n) <= 2*A003418(n). - _Charles R Greathouse IV_, May 08 2023 %e A362532 a(2) = 4 since 4 mod 2 = 0, 4 mod 4 = 0 (but 4 mod 6 = 4 >= 3) while 1 mod 2 = 1, 2 mod 4 = 2, 3 mod 2 = 1. %o A362532 (PARI) a(n)=my(m);m=1;while(vecmax(vector(n,j,(m%(2*j))/j))>=1,m=m+1);m %o A362532 (PARI) n=1;for(m=1,10^9,while(vecmax(vector(n,j,(m%(2*j))/j))<1,print(n," ",m);n=n+1)) %o A362532 (PARI) a(n,startAt=1)=if(n<5, return(2^min(n,3))); my(s=if(n>146,70274254050, n>108,10039179150, n>94,436486050, n>65,22972950, n>50,417690, n>46,8190, n>27,630, n>17,90, n>12,30, 6)<<logint(n,2)); forstep(m=ceil(startAt/s)*s,oo,s, for(k=5,n, if(m%(2*k)>=k, next(2))); return(m)) \\ _Charles R Greathouse IV_, Apr 28 2023 %o A362532 (Python) %o A362532 from itertools import count, islice %o A362532 def agen(): # generator of terms %o A362532 m = 1 %o A362532 for n in count(1): %o A362532 while not all(m%(2*k) < k for k in range(1, n+1)): m += 1 %o A362532 yield m %o A362532 print(list(islice(agen(), 37))) # _Michael S. Branicky_, Apr 24 2023 %Y A362532 Cf. A053664. %K A362532 nonn %O A362532 1,1 %A A362532 _Tomohiro Yamada_, Apr 24 2023