OFFSET
1,3
COMMENTS
a(n) = #{d: d<=n and A005563(n+1) mod d = 0};
If a(6n) = 2 for n>=1, then 6n-1 and 6n+1 are twin primes see A129297. - Fred Daniel Kline, Jan 02 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Adrian W. Dudek, On the number of divisors of n^2-1, Bulletin of the Australian Mathematical Society, Vol. 93, No. 2 (2016), pp. 194-198; arXiv preprint, arXiv:1507.08893 [math.NT], 2015.
FORMULA
a(n) = A000005(n^2-1)/2 for n >= 2. - Robert Israel, Aug 03 2015
EXAMPLE
a(100) = #{1,3,9,11,33,99} = 6.
MAPLE
1, seq(numtheory:-tau(n^2-1)/2, n=2..100); # Robert Israel, Aug 03 2015
MATHEMATICA
nd[n_]:=Count[Divisors[n^2-1], _?(#<=n&)]; Array[nd, 100] (* Harvey P. Dale, Jan 03 2014 *)
a[n_] := DivisorSigma[0, n^2 -1]/2; a[1] = 1; Array[a, 100] (* Amiram Eldar, Jun 18 2022 *)
PROG
(PARI) a(n) = if (n==1, 1, sumdiv(n^2-1, d, d<=n)); \\ Michel Marcus, Jan 02 2014
(Haskell)
a129296 n = length [d | d <- [1..n], (n ^ 2 - 1) `mod` d == 0]
-- Reinhard Zumkeller, Jan 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 09 2007
STATUS
approved