login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A249340
Position of the first occurrence of n-th noncomposite number, A008578(n), in A249336; positions of records in A249338.
5
1, 3, 5, 13, 20, 39, 50, 70, 80, 97, 131, 142, 193, 240, 257, 296, 322, 379, 397, 435, 478, 490, 542, 569, 629, 736, 758, 764, 828, 835, 872, 1067, 1100, 1209, 1214, 1369, 1414, 1468, 1514, 1549, 1606, 1681, 1700, 1853, 1871, 1903, 1931, 2116, 2244, 2293, 2303, 2343
OFFSET
1,2
FORMULA
a(n) = A249339(n+1) - 1.
Other identities. For all n >= 1:
A249336(a(n)) = A008578(n).
A249338(a(n)) = n-1.
PROG
(Scheme, with Antti Karttunen's IntSeq-library, two alternative definitions)
(define A249340 (MATCHING-POS 1 1 (lambda (n) (and (= 1 (A249336 (+ 1 n))) (or (= 1 (A249336 n)) (prime? (A249336 n)))))))
(define A249340 (RECORD-POS 1 1 A249338))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 26 2014
STATUS
approved