OFFSET
1,3
COMMENTS
Since m^2-1 = (m+1)(m-1), this sequence is just 0,1,2,3, and the average of twin prime pairs A014574.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
{1,41,43,1763} is the set of divisors of 42^2-1, therefore 42 is a term, A129296(42) = #{1,41} = 2.
MATHEMATICA
nniQ[n_]:=Count[Rest[Divisors[n^2-1]], _?(#<n-1&)]==0; Join[{0, 1}, Select[ Range[2, 1500], nniQ]] (* Harvey P. Dale, Aug 09 2015 *)
Select[Range[0, 1500], #<4 || And @@ PrimeQ[# + {-1, 1}] &] (* Amiram Eldar, Jun 18 2022 *)
PROG
(PARI) isA129297(n) = (n <= 3) || divisors(n^2-1)[2] >= n-1
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 09 2007
STATUS
approved