login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the greatest k > 0 such that 1+n, 1+2*n, ..., 1+n*k are pairwise coprime.
3

%I #38 Dec 13 2021 16:14:14

%S 2,3,2,4,2,7,2,3,2,4,2,6,2,3,2,4,2,7,2,3,2,4,2,5,2,3,2,4,2,9,2,3,2,4,

%T 2,8,2,3,2,4,2,6,2,3,2,4,2,7,2,3,2,4,2,5,2,3,2,4,2,11,2,3,2,4,2,8,2,3,

%U 2,4,2,6,2,3,2,4,2,7,2,3,2,4,2,5,2,3,2

%N a(n) is the greatest k > 0 such that 1+n, 1+2*n, ..., 1+n*k are pairwise coprime.

%C This sequence is well defined: for any n > 0, if p > 1 divides 1+n, then p divides 1+n*(1+p), gcd(1+n, 1+n*(1+p)) > 1 and a(n) <= p.

%C This sequence is unbounded.

%H Antti Karttunen, <a href="/A339749/b339749.txt">Table of n, a(n) for n = 1..65537</a>

%F a(n) = 2 for any odd n.

%F a(n!) > n for any n >= 0.

%F a(n) <= A020639(n+1).

%e For n = 2:

%e - gcd(1+2*1, 1+2*2) = 1,

%e - gcd(1+2*1, 1+2*3) = 1,

%e - gcd(1+2*2, 1+2*3) = 1,

%e - however gcd(1+2*1, 1+2*4) = 3,

%e - so a(2) = 3.

%o (PARI) a(n) = { my (p=1); for (k=1, oo, if (gcd(p, 1+n*k)>1, return (k-1), p*=1+n*k)) }

%Y Cf. A020639, A339743, A339759.

%K nonn

%O 1,1

%A _Rémy Sigrist_, Dec 16 2020