cp's OEIS Frontend

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.

A361247 a(n) is the smallest integer k > 2 that satisfies k mod j <= 2 for all integers j in 1..n.

This page as a plain text file.
%I A361247 #25 Jun 02 2023 10:20:52
%S A361247 3,3,3,4,5,6,30,42,56,72,792,792,1080,1080,1080,30240,246961,246961,
%T A361247 636482,636482,1360801,2162162,2162162,2162162,39412802,39412802,
%U A361247 107881202,107881202,3625549202,3625549202,3625549202,170918748001,170918748001,170918748001,170918748001,170918748001
%N A361247 a(n) is the smallest integer k > 2 that satisfies k mod j <= 2 for all integers j in 1..n.
%H A361247 Chai Wah Wu, <a href="/A361247/b361247.txt">Table of n, a(n) for n = 1..40</a>
%e A361247 a(7)=30 since 30 mod 7 = 2, 30 mod 6 = 0, 30 mod 5 = 0, 30 mod 4 = 2, 30 mod 3 = 0, 30 mod 2 = 0 and 30 is the smallest integer greater than 2 where all of these remainders are 2 or less.
%o A361247 (Python)
%o A361247 final=100
%o A361247 k=3
%o A361247 for n in range(1, final+1):
%o A361247     j = n+1
%o A361247     while (j > 2):
%o A361247         j -= 1
%o A361247         if k%j>2:
%o A361247               k += j-(k%j)
%o A361247               j = n+1
%o A361247     print(k)
%o A361247 (PARI) isok(k, n) = for (j=1, n, if ((k % j) > 2, return(0))); return(1);
%o A361247 a(n) = my(k=3); while(!isok(k, n), k++); k; \\ _Michel Marcus_, Mar 17 2023
%Y A361247 Cf. A003418 (all remainders 0).
%Y A361247 Cf. also A361246, A361248.
%Y A361247 Equals {A056697}+1.  - _Hugo Pfoertner_, May 11 2023
%K A361247 nonn
%O A361247 1,1
%A A361247 _Andrew Cogliano_, Mar 05 2023
%E A361247 a(32)-a(36) from _Chai Wah Wu_, Apr 24 2023