OFFSET
1,2
COMMENTS
For n > 0, A000290(n) is a term. - Ivan N. Ianakiev, May 03 2020
For nonsquares, d is the tau(n)/2-th divisor of n. - David A. Corneth, May 03 2020
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
9 is in the sequence since it has the divisor pair (3,3) with each divisor sharing the same next prime, which is 5.
12 is in the sequence since it has the divisor pair (3,4) and both 3 and 4 have 5 as their next prime.
MATHEMATICA
Table[If[Sum[KroneckerDelta[NextPrime[i], NextPrime[n/i]] (1 - Ceiling[n/i] + Floor[n/i]), {i, n}] > 0, n, {}], {n, 500}] // Flatten
PROG
(PARI) isok(n) = fordiv(n, d, if (nextprime(d+1) == nextprime(n/d+1), return (1)); if (d>n/d, break)); \\ Michel Marcus, Apr 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Apr 30 2020
STATUS
approved