login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240024 Nonprime EKG sequence, cf. A064413: a(1) = 1, a(2) = 4 and for n > 2, a(n) = smallest composite number not already used which shares a factor with a(n-1). 8
1, 4, 6, 8, 10, 12, 9, 15, 18, 14, 16, 20, 22, 24, 21, 27, 30, 25, 35, 28, 26, 32, 34, 36, 33, 39, 42, 38, 40, 44, 46, 48, 45, 50, 52, 54, 51, 57, 60, 55, 65, 70, 49, 56, 58, 62, 64, 66, 63, 69, 72, 68, 74, 76, 78, 75, 80, 82, 84, 77, 88, 86, 90, 81, 87, 93 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A239965 gives the position of the n-th nonprime; a(A239965(n))=A018252(n).

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, EKG Sequence

Index entries for sequences related to EKG sequence

MATHEMATICA

a = {1, 4}; Do[k = 6; While[Or[PrimeQ@ k, MemberQ[a, k], CoprimeQ[a[[i - 1]], k]], k++]; AppendTo[a, k], {i, 3, 66}]; a (* Michael De Vlieger, Sep 01 2016 *)

PROG

(Haskell)

import Data.List (delete, genericIndex)

a240024 n = genericIndex a240024_list (n - 1)

a240024_list = 1 : ekg 4 a002808_list where

   ekg x zs = f zs where

       f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys

CROSSREFS

Cf. A064413, A064664 (EKG sequence).

Cf. A018252, A075570, A239965.

Sequence in context: A284913 A139203 A179372 * A227405 A061408 A063287

Adjacent sequences:  A240021 A240022 A240023 * A240025 A240026 A240027

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Apr 30 2014

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 May 21 03:30 EDT 2019. Contains 323434 sequences. (Running on oeis4.)