The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091780 Alternately odd and even numbers such that a(n) is the least number not included earlier and has a common factor with a(n-1). 2

%I #11 Nov 27 2017 00:22:37

%S 3,6,9,12,15,10,5,20,25,30,21,14,7,28,35,40,45,18,27,24,33,22,11,44,

%T 55,50,65,26,13,52,39,36,51,34,17,68,85,60,57,38,19,76,95,70,49,42,63,

%U 48,69,46,23,92,115,80,75,54,81,66,77,56,91,78,87,58,29,116,145,90,93,62

%N Alternately odd and even numbers such that a(n) is the least number not included earlier and has a common factor with a(n-1).

%C The sequence contains all the numbers except powers of 2.

%p A091780 := proc(nmax) local a,nstrt; a := [3] ; while nops(a) < nmax do if nops(a) mod 2 = 0 then nstrt := 5; else nstrt := 4 ; fi ; while nstrt in a or gcd(nstrt,op(-1,a)) < 2 do nstrt := nstrt+2 ; od ; a := [op(a),nstrt] ; od ; a ; end: A091780(80) ; # _R. J. Mathar_, Jul 26 2007

%K nonn

%O 1,1

%A _Amarnath Murthy_, Feb 16 2004

%E More terms from _R. J. Mathar_, Jul 26 2007

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 06:06 EDT 2024. Contains 373089 sequences. (Running on oeis4.)