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”).

A251719
a(n) = the least k such that A250474(k) > n.
11
1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10
OFFSET
1,4
COMMENTS
Provided that A250474 is strictly increasing (implied for example if either Legendre's or Brocard's conjecture is true) then all natural numbers occur in this sequence, in order, and after three 1's, each n+1 appears for the first time at A250474(n). Thus from n=2 onward, each n occurs A251723(n-1) times.
With the same provision, we have for n>1: a(n) = smallest positive integer k such that A083221(k, n) is a semiprime and A083221(k+1, n) = A003961(A083221(k, n)), where A003961 shifts the prime factorization one step towards larger primes, thus the latter value is also a semiprime.
LINKS
FORMULA
Equally: a(1) = a(2) = a(3) = 1; and for n>=4: a(n) = the largest k such that A250474(k-1) <= n.
Other identities. For all n >= 1:
a(n) >= A251718(n) >= A251717(n).
a(n) = A055396(A251724(n)), or equally, A251724(n) = A083221(a(n), n). [This sequence gives the row-index of the first "settled semiprime" in column n of the sieve of Eratosthenes.]
PROG
(Scheme, two variants)
(define (A251719 n) (let loop ((k 1)) (if (> (A250474 k) n) k (loop (+ 1 k))))) ;; Very straightforward version.
;; Code for A083221bi given in A083221.
(define (A251719 n) (if (= 1 n) 1 (let loop ((i 1) (eka (A083221bi 1 n)) (toka (A083221bi 2 n))) (if (and (= (A001222 eka) 2) (= toka (A003961 eka))) i (loop (+ i 1) toka (A083221bi (+ i 2) n))))))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 15 2014
STATUS
approved