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-1 of 1 results.

A301618 Least k > n such that gcd(k+1,n+1) > gcd(k,n) > 1.

Original entry on oeis.org

8, 15, 14, 35, 20, 63, 14, 24, 32, 143, 38, 195, 20, 27, 50, 323, 56, 399, 26, 54, 68, 575, 34, 90, 32, 39, 86, 899, 92, 1023, 38, 84, 44, 65, 110, 1443, 44, 51, 122, 1763, 128, 1935, 50, 114, 140, 2303, 62, 119, 56, 63, 158, 2915, 64, 90, 62, 144, 176, 3599, 182, 3843
Offset: 2

Views

Author

Alex Ratushnyak, Mar 24 2018

Keywords

Examples

			From _Michael De Vlieger_, Apr 21 2018: (Start)
a(1) is not defined since 1 is coprime to all numbers.
a(2) = 8 since gcd(2,8) = 2 and gcd(3,9) = 3. Of numbers 3 <= m < 8, gcd(2,m) > 1 for m even, but gcd(3,m+1) = 1.
a(3) = 15 since gcd(3,15) = 3 and gcd(4,16) = 4. Of numbers 4 <= m < 15, gcd(3,m) > 1 for 3 | m, but gcd(4,m+1) = 1. (End)
		

Crossrefs

Cf. A299143.

Programs

  • Mathematica
    Array[Block[{k = # + 1}, While[Not[GCD[k + 1, # + 1] > GCD[k, #] > 1], k++]; k] &, 60, 2] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n) = {my(k = n+1); while((gcd(k,n) == 1) || (gcd(k+1,n+1) <= gcd(k,n)), k++); k;} \\ Michel Marcus, Mar 26 2018

Formula

If p is a prime, a(p) = p*(p+2).
a(n) >= A299143(n). - Michel Marcus, Mar 26 2018
Showing 1-1 of 1 results.