login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140524 a(1)=2. For n >=2, a(n) = the least integer >= n that is non-coprime to both n and a(n-1). 1
2, 2, 6, 4, 10, 6, 14, 8, 12, 10, 22, 12, 26, 14, 18, 16, 34, 18, 38, 20, 24, 22, 46, 24, 30, 26, 30, 28, 58, 30, 62, 32, 36, 34, 40, 36, 74, 38, 42, 40, 82, 42, 86, 44, 48, 46, 94, 48, 56, 50, 54, 52, 106, 54, 60, 56, 60, 58, 118, 60, 122, 62, 66, 64, 70, 66, 134, 68, 72, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

f:= proc(n) option remember; local k, v;

  v:= procname(n-1);

  for k from n do if igcd(k, n) > 1 and igcd(k, v) > 1 then return k fi

  od:

end proc:

f(1):= 2:

map(f, [$1..100]); # Robert Israel, Mar 07 2018

MATHEMATICA

a = {2}; Do[ i = n; While[ Min[ GCD[ a[ [ -1 ] ], i ], GCD[ n, i ] ] == 1, i++ ]; AppendTo[ a, i ], {n, 2, 60} ]; a (* Stefan Steinerberger, Aug 04 2008 *)

CROSSREFS

Sequence in context: A284918 A053213 A292258 * A204904 A109043 A054585

Adjacent sequences:  A140521 A140522 A140523 * A140525 A140526 A140527

KEYWORD

nonn

AUTHOR

Leroy Quet, Jul 02 2008

EXTENSIONS

More terms from Stefan Steinerberger, Aug 04 2008

a(61)-a(70) from Ray Chandler, Jun 25 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 1 15:05 EDT 2020. Contains 337443 sequences. (Running on oeis4.)