OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..2500
EXAMPLE
a(10) = 12 as A069230(12) = 10 as there are 10 primes between (exclusive) 12 and 12 + tau(12)^2 = 12 + 6^2 = 12 + 36 = 48 namely the 10 primes 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 and k = 12 is the least k such that there are ten primes between (exclusive) k and k + tau(k)^2 where tau is the number of divisors (Cf. A000005).
PROG
(PARI) A069230(n) = {my(cnt = 0); for(k = n+1, n+numdiv(n)^2-1, cnt += isprime(k)); cnt; };
list(nmax) = {my(v = vector(nmax+1), c = 0, k = 1, i); while(c < nmax+1, i = A069230(k) + 1; if(i <= nmax + 1 && v[i] == 0, c++; v[i] = k); k++); v; } \\ Amiram Eldar, Jan 29 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
David A. Corneth, Sep 20 2020
STATUS
approved
