The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A130498 a(1)=1. a(n) = number of earlier terms of the sequence which are coprime to (the number of positive integers which are <=n and missing from first (n-1) terms of sequence). 2

%I

%S 1,1,2,2,4,5,6,6,3,4,9,10,10,3,14,14,6,11,12,12,6,20,21,22,22,4,26,26,

%T 7,7,16,17,18,18,11,34,34,8,8,39,40,41,42,43,44,45,46,47,48,49,50,51,

%U 52,53,54,55,56,57,57,20,34,20,61,62,63,64,65,66,67,68,69

%N a(1)=1. a(n) = number of earlier terms of the sequence which are coprime to (the number of positive integers which are <=n and missing from first (n-1) terms of sequence).

%H Diana L. Mecum, <a href="/A130498/b130498.txt">Table of n, a(n) for n = 1..1011</a>

%e The positive integers which are <= 9 and are missing from the first 8 terms of the sequence are 3,7,8,9. There are 4 such integers, so a(9) is the number of earlier terms which are coprime to 4. Therefore a(9) = 3.

%t t = {1, 1, 2, 2, 4, 5, 6, 6, 3, 4}; n = 11; count = 0; comp = Complement[Range[Length[t] + 1], t]; Do[If[CoprimeQ[t[[j]], Length[comp]], count = count + 1], {j, 1, Length[t]}]; t = Append[t, count]; Do[n = n + 1; count = 0; comp = Complement[Range[Length[t] + 1], t]; Do[If[CoprimeQ[t[[j]], Length[comp]], count = count + 1], {j, 1, Length[t]}]; t = Append[t, count], {100}]; t (* _Diana L. Mecum_, Aug 06 2012 *)

%Y Cf. A130499.

%K nonn

%O 1,3

%A _Leroy Quet_, May 31 2007

%E Terms corrected by _Diana L. Mecum_, Aug 06 2012

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.

Last modified June 12 07:43 EDT 2021. Contains 344943 sequences. (Running on oeis4.)