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.

A356371 a(n) is the smallest positive integer k, such that set of pairwise gcd of k, k+1, ..., k+n has a cardinality of n.

Original entry on oeis.org

1, 2, 3, 8, 15, 24, 35, 48, 63, 270, 440, 528, 780, 1078, 2925, 1440, 8160, 2142, 5472, 34560, 23919, 235598, 64239, 42480, 158400, 1255800, 1614600, 1247400, 16442971, 8233650, 41021370, 21561120, 127327167, 439824000, 439824000, 24504444, 1329112224, 1653775162
Offset: 1

Views

Author

Gleb Ivanov, Oct 17 2022

Keywords

Comments

n | a(n). - David A. Corneth, Oct 17 2022

Crossrefs

Cf. A214799.

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[Length[Union[GCD @@@ Subsets[k + Range[0, n], {2}]]] != n, k++]; k]; Array[a, 20] (* Amiram Eldar, Oct 17 2022 *)
  • Python
    from math import gcd
    from itertools import count
    def A356371(n):
        for k in count(n,n):
            if len(set(gcd(i,j) for i in range(k,n+k+1) for j in range(i+1,n+k+1))) == n:
                return k # Chai Wah Wu, Oct 18 2022

Extensions

a(31)-a(38) from Giovanni Resta, Oct 17 2022