The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A361246 a(n) is the smallest integer k > 1 that satisfies k mod j <= 1 for all integers j in 1..n. 3
 2, 2, 3, 4, 16, 25, 36, 120, 505, 721, 2520, 2520, 41041, 83161, 83161, 196560, 524161, 524161, 3160080, 3160080, 3160080, 3160080, 68468401, 68468401, 68468401, 68468401, 4724319601, 4724319601, 26702676000, 26702676000 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Chai Wah Wu, Table of n, a(n) for n = 1..112 FORMULA a(n) = A064219(n)+1. - Chai Wah Wu, Jun 19 2023 EXAMPLE a(7)=36 since 36 mod 7 = 1, 36 mod 6 = 0, 36 mod 5 = 1, 36 mod 4 = 0, 36 mod 3 = 0, 36 mod 2 = 0, 36 mod 1 = 0 and 36 is the smallest integer greater than 1 where all of these remainders are 1 or less. PROG (Python) final=100 k=2 for n in range(1, final+1): j = n+1 while (j > 1): j -= 1 if k%j>1: k += j-(k%j) j = n+1 print(k) (Python) from math import lcm from itertools import product from sympy.ntheory.modular import solve_congruence def A361246(n): if n == 1: return 2 alist, blist, c, klist = [], [], 1, list(range(n, 1, -1)) while klist: k = klist.pop(0) if not c%k: blist.append(k) else: c = lcm(c, k) alist.append(k) for m in klist.copy(): if not k%m: klist.remove(m) for d in product([0, 1], repeat=len(alist)): x = solve_congruence(*list(zip(d, alist))) if x is not None: y = x[0] if y > 1: for b in blist: if y%b > 1: break else: if y < c: c = y return int(c) # Chai Wah Wu, Jun 19 2023 (PARI) isok(k, n) = for (j=1, n, if ((k % j) > 1, return(0))); return(1); a(n) = my(k=2); while(!isok(k, n), k++); k; \\ Michel Marcus, Mar 17 2023 CROSSREFS Cf. A003418 (all remainders 0). Cf. A064219, A361247, A361248. Sequence in context: A363745 A022405 A309895 * A270744 A093927 A067088 Adjacent sequences: A361243 A361244 A361245 * A361247 A361248 A361249 KEYWORD nonn AUTHOR Andrew Cogliano, Mar 05 2023 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 15 17:35 EDT 2024. Contains 375173 sequences. (Running on oeis4.)