OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10431
MATHEMATICA
f[x_] := f[x] = (x^2 + x)/2;
u[n_] := NextPrime[f[n], -1]; v[n_] := NextPrime[f[n]];
s1 = Select[Range[1000], f[#] - v[#] < u[#] - f[#] &] (* A392123 *)
PROG
(Magma) f := func<n | (n^2 + n) div 2>; s1 := [ n : n in [1..300] | f(n) ge 3 and f(n) - NextPrime(f(n)) lt PreviousPrime(f(n)) - f(n)]; s1; // Vincenzo Librandi, Feb 13 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 26 2026
STATUS
approved
