OFFSET
1,3
COMMENTS
Sequence A161794 suggests the size of prime gaps grows slower than the size of square intervals, lending credence to Legendre's conjecture.
EXAMPLE
A161794 begins 1, 2, 4, 4, 6, 6, 6, 6, ... that is, 1 one, 1 two, 2 four, 4 six, ... so this sequence begins 1, 1, 2, 4, ...
PROG
(PARI) f(n) = my(vp = primes(primepi((n+1)^2))); vecmax(vector(#vp-1, k, vp[k+1] - vp[k])); \\ A161794
lista(nn) = my(v = vector(nn, k, f(k))); my(list = List(), last = v[1], nb=1); for (n=2, #v, if (v[n] == last, nb++, listput(list, nb); nb = 1; last = v[n]; ); ); Vec(list); \\ Michel Marcus, Aug 15 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Daniel Tisdale, Jun 19 2009
EXTENSIONS
a(15)-a(21) from Michel Marcus, Aug 15 2022
STATUS
approved