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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

3, 3, 3, 4, 5, 6, 30, 42, 56, 72, 792, 792, 1080, 1080, 1080, 30240, 246961, 246961, 636482, 636482, 1360801, 2162162, 2162162, 2162162, 39412802, 39412802, 107881202, 107881202, 3625549202, 3625549202, 3625549202, 170918748001, 170918748001, 170918748001, 170918748001, 170918748001
Offset: 1

Views

Author

Andrew Cogliano, Mar 05 2023

Keywords

Examples

			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.
		

Crossrefs

Cf. A003418 (all remainders 0).
Cf. also A361246, A361248.
Equals {A056697}+1. - Hugo Pfoertner, May 11 2023

Programs

  • PARI
    isok(k, n) = for (j=1, n, if ((k % j) > 2, return(0))); return(1);
    a(n) = my(k=3); while(!isok(k, n), k++); k; \\ Michel Marcus, Mar 17 2023
  • Python
    final=100
    k=3
    for n in range(1, final+1):
        j = n+1
        while (j > 2):
            j -= 1
            if k%j>2:
                  k += j-(k%j)
                  j = n+1
        print(k)
    

Extensions

a(32)-a(36) from Chai Wah Wu, Apr 24 2023

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

Original entry on oeis.org

4, 4, 4, 4, 5, 6, 7, 8, 56, 72, 91, 651, 651, 1080, 1080, 1443, 20163, 20163, 246962, 246962, 246962, 609843, 2162162, 2162162, 29055601, 29055601, 107881202, 107881202, 205405203, 205405203, 3625549202, 5675443203, 8374212002, 8374212002, 8374212002, 8374212002, 131668891200, 131668891200
Offset: 1

Views

Author

Andrew Cogliano, Mar 05 2023

Keywords

Examples

			a(11)=91 since 91 mod 11 = 3, 91 mod 10 = 1, 91 mod 9 = 1, 91 mod 8 = 3, 91 mod 7 = 0, 91 mod 6 = 1, 91 mod 5 = 1, 91 mod 4 = 3, 91 mod 3 = 1, 91 mod 2 = 1, 91 mod 1 = 0 and 91 is the smallest integer greater than 3 where all of these remainders are 3 or less.
		

Crossrefs

Cf. A003418 (all remainders 0).

Programs

  • PARI
    isok(k, n) = for (j=5, n, if ((k % j) > 3, return(0))); return(1);
    a(n) = my(k=4); while(!isok(k, n), k++); k; \\ Michel Marcus, Mar 17 2023
  • Python
    final=100
    k=4
    for n in range(1, final+1):
        j = n+1
        while (j > 3):
            j -= 1
            if k%j>3:
                  k += j-(k%j)
                  j = n+1
        print(k)
    

Formula

For n > 2, n <= a(n) < A003418(n). - Charles R Greathouse IV, Apr 27 2023
Showing 1-2 of 2 results.