|
Search: id:A118784
|
|
|
| A118784 |
|
a(0) = 1. a(n) = (number of earlier terms of the sequence which are coprime to n)th positive integer not among the earlier terms of the sequence. |
|
+0 2
|
|
| 1, 2, 3, 5, 7, 9, 8, 13, 14, 16, 12, 22, 11, 25, 19, 24, 23, 34, 21, 37, 28, 32, 30, 45, 27, 46, 36, 43, 38, 58, 26, 62, 42, 52, 44, 60, 33, 73, 49, 61, 50, 82, 39, 85, 56, 70, 59, 94, 51, 89, 64, 83, 68, 106, 55, 96, 71, 95, 78, 117, 53, 121, 86, 100, 87, 111, 66, 134, 90, 112
(list; graph; listen)
|
|
|
OFFSET
|
0,2
|
|
|
LINKS
|
Leroy Quet, Home Page (listed in lieu of email address)
|
|
EXAMPLE
|
The first 8 terms of the sequence (a(0) through a(7)) are 1,2,3,5,7,9,8,13. Of these there are 6 terms that are coprime to 8 (those terms being 1, 3, 5, 7, 9 and 13). So a(8) is the 6th positive integer missing from the first 8 terms of the sequence (i.e. is the 6th integer of the sequence 4, 6, 10, 11, 12, 14, 15, 16,..). So a(8) = 14.
|
|
PROGRAM
|
Contribution from Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jul 30 2009: (Start)
(MAGMA) find:=function(S, k) c:=0; j:=0; while j lt #S and c lt k do j+:=1; if S[j] eq 0 then c+:=1; end if; end while; if c eq k then return j; else return 0; end if; end function;
z:=150; m:=70; W:=[ 0: n in [1..z] ]; V:=[1]; W[1]:=1; for n in [1..m] do c:=#[ j: j in [1..#V] | Gcd(n, V[j]) eq 1 ]; a:=find(W, c); if a eq 0 then break; end if; W[a]:=1; Append(~V, a); end for; print V; (End)
|
|
CROSSREFS
|
Cf. A118783.
Sequence in context: A075012 A067090 A139790 this_sequence A102246 A089743 A080587
Adjacent sequences: A118781 A118782 A118783 this_sequence A118785 A118786 A118787
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet Apr 29 2006
|
|
EXTENSIONS
|
Extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jul 30 2009
|
|
|
Search completed in 0.002 seconds
|