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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064418 a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4; for n > 4, a(n) = smallest number not already used such that GCD{ a(n), a(n-1) } >= 4. 3
1, 2, 3, 4, 8, 12, 6, 18, 9, 27, 36, 16, 20, 5, 10, 15, 25, 30, 24, 28, 7, 14, 21, 35, 40, 32, 44, 11, 22, 33, 55, 45, 50, 60, 42, 48, 52, 13, 26, 39, 65, 70, 49, 56, 63, 54, 66, 72, 64, 68, 17, 34, 51, 85, 75, 80, 76, 19, 38, 57, 95, 90, 78, 84, 77, 88, 92, 23, 46, 69, 115, 100, 96 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A permutation of the natural numbers.

LINKS

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

J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG sequence, Exper. Math. 11 (2002), 437-446.

Index entries for sequences related to EKG sequence

Index entries for sequences that are permutations of the natural numbers

MATHEMATICA

A064418 = Range[4]; Do[ For[ an=5, True, an++, If[GCD[an, Last[A064418]] >= 4 && FreeQ[A064418, an], AppendTo[A064418, an]; Break[]]], {70}]; A064418 (* Jean-Fran├žois Alcover, May 07 2012 *)

PROG

(Haskell)

import Data.List (delete)

a064418 n = a064418_list !! (n-1)

a064418_list = 1 : 2 : 3 : 4 : (f 4 [5..]) where

   f :: Integer -> [Integer] -> [Integer]

   f x xs = m : (f m $ delete m xs) where

      m = head $ dropWhile ((< 4) . (gcd x)) xs

-- Reinhard Zumkeller, Feb 20 2011

CROSSREFS

Cf. A064413. Inverse permutation: A064958.

Sequence in context: A245388 A164573 A004045 * A171164 A283659 A032939

Adjacent sequences:  A064415 A064416 A064417 * A064419 A064420 A064421

KEYWORD

nonn,nice,easy

AUTHOR

Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Sep 30 2001

EXTENSIONS

More terms from Naohiro Nomoto, Sep 30 2001

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 January 18 06:34 EST 2019. Contains 319269 sequences. (Running on oeis4.)