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.

This page as a plain text file.
%I A356371 #36 Oct 27 2023 19:34:18
%S A356371 1,2,3,8,15,24,35,48,63,270,440,528,780,1078,2925,1440,8160,2142,5472,
%T A356371 34560,23919,235598,64239,42480,158400,1255800,1614600,1247400,
%U A356371 16442971,8233650,41021370,21561120,127327167,439824000,439824000,24504444,1329112224,1653775162
%N 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.
%C A356371 n | a(n). - _David A. Corneth_, Oct 17 2022
%H A356371 Giovanni Resta, <a href="/A356371/b356371.txt">Table of n, a(n) for n = 1..60</a> (first 42 terms from Chai Wah Wu)
%t A356371 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 *)
%o A356371 (Python)
%o A356371 from math import gcd
%o A356371 from itertools import count
%o A356371 def A356371(n):
%o A356371     for k in count(n,n):
%o A356371         if len(set(gcd(i,j) for i in range(k,n+k+1) for j in range(i+1,n+k+1))) == n:
%o A356371             return k # _Chai Wah Wu_, Oct 18 2022
%Y A356371 Cf. A214799.
%K A356371 nonn
%O A356371 1,2
%A A356371 _Gleb Ivanov_, Oct 17 2022
%E A356371 a(31)-a(38) from _Giovanni Resta_, Oct 17 2022