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!)
A114861 a(n) is smallest positive integer not among the earlier terms of the sequence, not equal to n and which is coprime to its adjacent terms in the sequence. 3

%I #13 Oct 11 2019 16:22:06

%S 2,1,4,3,7,5,6,11,8,9,10,13,12,17,14,15,16,19,18,23,20,21,22,25,24,29,

%T 26,27,28,31,30,37,32,33,34,35,36,41,38,39,40,43,42,47,44,45,46,49,48,

%U 53,50,51,52,55,54,59,56,57,58,61,60,67,62,63,64,65,66,71,68,69,70,73

%N a(n) is smallest positive integer not among the earlier terms of the sequence, not equal to n and which is coprime to its adjacent terms in the sequence.

%C Sequence is a permutation of the positive integers. (Inverse permutation is sequence A114862.)

%e a(8) = 11 since 11 is the smallest positive integer not among the first 7 terms of the sequence, not equal to 8 and which is coprime to a(7) = 6.

%t f[l_] := Block[{k = 1}, While[k == Length[l] + 1 || MemberQ[l, k] || GCD[k, Last[l]] > 1, k++ ]; Return[Append[l, k]]; ]; Nest[f, {}, 76] (* _Ray Chandler_, Jan 02 2006 *)

%Y Cf. A114862.

%K nonn

%O 1,1

%A _Leroy Quet_, Jan 02 2006

%E More terms from _Ray Chandler_ and _Klaus Brockhaus_, Jan 02 2006

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 March 28 16:34 EDT 2024. Contains 371254 sequences. (Running on oeis4.)