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!)
A177958 a(n) = n for n <= 6; for n > 6, a(n) is the smallest number not already used such that gcd(a(n), a(n-1)) >= 6. 2
1, 2, 3, 4, 5, 6, 12, 18, 9, 27, 36, 24, 8, 16, 32, 40, 10, 20, 30, 15, 45, 54, 42, 7, 14, 21, 28, 35, 49, 56, 48, 60, 50, 25, 75, 90, 63, 70, 77, 11, 22, 33, 44, 55, 66, 72, 64, 80, 88, 96, 78, 13, 26, 39, 52, 65, 91, 84, 98, 105 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A permutation of the natural numbers.

LINKS

Ivan Neretin and Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 2000 terms from Ivan Neretin)

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

J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG sequence, arXiv:math/0204011 [math.NT], 2002.

Index entries for sequences related to EKG sequence

Index entries for sequences that are permutations of the natural numbers

MAPLE

ina:= proc(n) evalb(n<7) end:

a:= proc(n) option remember;

local k;

if n<7 then n

else for k while ina(k) or igcd (k, a(n-1))<6 do od;

ina(k):= true; k

fi

end;

seq(a(n), n=1..60);

MATHEMATICA

t=Range[6]; Do[k=7; While[MemberQ[t, k] || GCD[t[[-1]], k] < 6, k++]; AppendTo[t, k], {n, 7, 100}]; t

PROG

(Python)

from sympy import gcd

l=list(range(1, 7))

for n in range(6, 101):

k=7

while k in l or gcd(l[n - 1], k)<6: k+=1

l.append(k)

print(l) # Indranil Ghosh, Jun 27 2017

CROSSREFS

Cf. A064413, A064417, A064418, A064419, A262434 (inverse).

Sequence in context: A032989 A322570 A108320 * A032941 A273733 A218345

Adjacent sequences: A177955 A177956 A177957 * A177959 A177960 A177961

KEYWORD

nonn,easy

AUTHOR

Jonathan Vos Post, Dec 16 2010

EXTENSIONS

Edited by Alois P. Heinz, Dec 16 2010

STATUS

approved

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 January 30 02:06 EST 2023. Contains 359939 sequences. (Running on oeis4.)