login
A301618
Least k > n such that gcd(k+1,n+1) > gcd(k,n) > 1.
0
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,1
FORMULA
If p is a prime, a(p) = p*(p+2).
a(n) >= A299143(n). - Michel Marcus, Mar 26 2018
EXAMPLE
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)
MATHEMATICA
Array[Block[{k = # + 1}, While[Not[GCD[k + 1, # + 1] > GCD[k, #] > 1], k++]; k] &, 60, 2] (* Michael De Vlieger, Apr 21 2018 *)
PROG
(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
CROSSREFS
Cf. A299143.
Sequence in context: A134990 A126852 A248389 * A192915 A229839 A114605
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 24 2018
STATUS
approved