login
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