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!)
 A243069 a(n) = smallest natural number that has not yet occurred among the first n terms of A126917. 5
 2, 3, 4, 4, 6, 6, 7, 7, 7, 7, 9, 9, 12, 12, 12, 12, 13, 13, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 19, 19, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 27, 27, 28, 28, 28, 28, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 36, 36, 37, 37, 37, 37, 37, 37, 39, 39, 39, 39, 42, 42, 45 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Facilitates the computing of A126917. a(n) grows only when n is a prime. A243498 gives the values at those points. LINKS Antti Karttunen, Table of n, a(n) for n = 1..10000 FORMULA For all n, a(n) <= A126917(n+1). For n >= 2, if A126917(n) > a(n-1) [when n is composite], a(n) = a(n-1). EXAMPLE The first eight terms of A126917 are: 1, 2, 3, 5, 4, 8, 6, 11. In range [1,1] the first that has not yet occurred is 2, in range [1,2] it is 3, in range [1,3] it is 4, in range [1,4] it is still 4, in range [1,5] it is 6, in range [1,6] it is still 6, in range [1,7] it is 7, in range [1,8] it is still 7, thus the first eight terms of this sequence are 2, 3, 4, 4, 6, 6, 7, 7. PROG (Scheme, with Antti Karttunen's IntSeq-library) (definec (A243069 n) (cond ((<= n 3) (+ 1 n)) ((= (A126917 n) (A243069 (- n 1))) (let loop ((i (A126917 n))) (if (not-lte? (A126918 i) n) i (loop (+ 1 i))))) (else (A243069 (- n 1))))) ;; We consider a > b (i.e. not less than b) also in case a is nil. ;; (Because of the stateful caching system used by defineperm1-macro which can be found from IntSeq-library): (define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b)))) CROSSREFS Cf. A126917, A126918, A243488, A243498. Sequence in context: A145340 A307989 A160680 * A342496 A061984 A337125 Adjacent sequences:  A243066 A243067 A243068 * A243070 A243071 A243072 KEYWORD nonn AUTHOR Antti Karttunen, Jun 20 2014 STATUS approved

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 July 26 01:15 EDT 2021. Contains 346294 sequences. (Running on oeis4.)