A362532 The smallest positive integer m such that m mod 2k < k for k = 1, 2, 3, ..., n.
2, 4, 8, 8, 24, 24, 72, 144, 144, 144, 384, 384, 2160, 2160, 2160, 6720, 54240, 57600, 131040, 131040, 131040, 131040, 612000, 612000, 612000, 612000, 612000, 776160, 776160, 776160, 6219360, 23184000, 28627200, 28627200, 28627200, 28627200, 28627200
Offset: 1
Keywords
Examples
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.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..136
- Tomohiro Yamada, Fast python program, the original program written by nazratt2.
Crossrefs
Cf. A053664.
Programs
-
PARI
a(n)=my(m);m=1;while(vecmax(vector(n,j,(m%(2*j))/j))>=1,m=m+1);m
-
PARI
n=1;for(m=1,10^9,while(vecmax(vector(n,j,(m%(2*j))/j))<1,print(n," ",m);n=n+1))
-
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)<
=k, next(2))); return(m)) \\ Charles R Greathouse IV, Apr 28 2023 -
Python
from itertools import count, islice def agen(): # generator of terms m = 1 for n in count(1): while not all(m%(2*k) < k for k in range(1, n+1)): m += 1 yield m print(list(islice(agen(), 37))) # Michael S. Branicky, Apr 24 2023
Formula
Trivial bounds: a(n-1) <= a(n) <= 2*A003418(n). - Charles R Greathouse IV, May 08 2023
Comments