The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A299143 a(n) is the least k > n such that gcd(k,n) > 1 and gcd(k+1,n+1) > 1. 2
 8, 9, 14, 15, 20, 21, 14, 15, 32, 33, 38, 39, 20, 21, 50, 51, 56, 57, 26, 27, 68, 69, 34, 35, 32, 33, 86, 87, 92, 93, 38, 39, 44, 45, 110, 111, 44, 45, 122, 123, 128, 129, 50, 51, 140, 141, 62, 63, 56, 57, 158, 159, 64, 65, 62, 63, 176, 177, 182, 183, 68, 69 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 LINKS Robert Israel, Table of n, a(n) for n = 2..10000 FORMULA From Rémy Sigrist, Feb 04 2018: (Start) a(p) = 3 * p for any odd prime p. a(2*k + 1) = a(2*k) + 1 for any k > 0. a(n) = n + 2*A172170(n + 1) for any n > 1. (End) EXAMPLE 8 is the least k>2 such that gcd(8,2)>1 and gcd(9,3)>1. So a(2)=8. 15 is the least k>9 such that gcd(15,9)>1 and gcd(16,10)>1. Therefore a(9)=15. MAPLE f:= proc(n) local k; for k from n+1 do if igcd(k, n)>1 and igcd(k+1, n+1)>1 then return k fi od end proc: map(f, [\$2..100]); # Robert Israel, Mar 08 2018 MATHEMATICA Array[Block[{k = # + 1}, While[Or[CoprimeQ[#, k], CoprimeQ[# + 1, k + 1]], k++]; k] &, 62, 2] (* Michael De Vlieger, Feb 03 2018 *) PROG (PARI) a(n) = for (k=n+1, oo, if (gcd(n, k)>1 && gcd(n+1, k+1)>1, return (k))) \\ Rémy Sigrist, Feb 04 2018 CROSSREFS Cf. A172170. Cf. A061228 or A159475 (when simply gcd(k,n) > 1). Sequence in context: A334915 A308893 A083134 * A068780 A174041 A096784 Adjacent sequences: A299140 A299141 A299142 * A299144 A299145 A299146 KEYWORD nonn AUTHOR Alex Ratushnyak, Feb 03 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 29 12:36 EDT 2023. Contains 365771 sequences. (Running on oeis4.)