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

 

Logo


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

%I

%S 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,

%T 44,11,22,33,55,45,50,60,42,48,52,13,26,39,65,70,49,56,63,54,66,72,64,

%U 68,17,34,51,85,75,80,76,19,38,57,95,90,78,84,77,88,92,23,46,69,115,100,96

%N 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.

%C A permutation of the natural numbers.

%H Reinhard Zumkeller, <a href="/A064418/b064418.txt">Table of n, a(n) for n = 1..10000</a>

%H J. C. Lagarias, E. M. Rains and N. J. A. Sloane, <a href="http://arXiv.org/abs/math.NT/0204011">The EKG sequence</a>, Exper. Math. 11 (2002), 437-446.

%H <a href="/index/Ed#EKG">Index entries for sequences related to EKG sequence</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%t 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 *)

%o (Haskell)

%o import Data.List (delete)

%o a064418 n = a064418_list !! (n-1)

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

%o f :: Integer -> [Integer] -> [Integer]

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

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

%o -- _Reinhard Zumkeller_, Feb 20 2011

%Y Cf. A064413. Inverse permutation: A064958.

%K nonn,nice,easy

%O 1,2

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

%E More terms from _Naohiro Nomoto_, Sep 30 2001

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 February 18 19:54 EST 2019. Contains 320262 sequences. (Running on oeis4.)