A347191 Number of divisors of n^2-1.
2, 4, 4, 8, 4, 10, 6, 10, 6, 16, 4, 16, 8, 12, 8, 18, 4, 24, 8, 16, 8, 20, 6, 20, 12, 16, 8, 32, 4, 28, 8, 14, 16, 24, 8, 24, 8, 20, 8, 40, 4, 32, 12, 16, 12, 24, 6, 36, 12, 24, 8, 32, 8, 40, 16, 20, 8, 32, 4, 32, 12, 16, 24, 32, 8, 32, 8, 32, 8, 60, 4, 30, 12, 16, 24, 32, 8, 48, 10, 24
Offset: 2
Keywords
Examples
a(5) = tau(5^2-1) = tau(24) = 8. a(18) = tau(18^2-1) = tau(17*19) = 4, 18 is average of twin primes 17 and 19.
Links
- Amiram Eldar, Table of n, a(n) for n = 2..10000
- Diophante, A1885, Cachés derrière leurs diviseurs (in French).
- 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.
Crossrefs
Programs
-
Maple
with(numtheory): seq(tau(n^2-1), n=2..81);
-
Mathematica
a[n_] := Length[Divisors[n^2 - 1]]; Table[a[n], {n, 2, 81}] (* Robert P. P. McKone, Aug 22 2021 *) Table[DivisorSigma[0, n^2 - 1], {n, 2, 100}] (* Vaclav Kotesovec, Aug 23 2021 *)
-
PARI
a(n) = numdiv(n^2-1); \\ Michel Marcus, Aug 23 2021
-
PARI
a(n)=my(a=valuation(n-1,2),b=valuation(n+1,2)); numdiv((n-1)>>a)*numdiv((n+1)>>b)*(a+b+1) \\ Charles R Greathouse IV, Sep 17 2021
-
PARI
first(n)=my(v=vector(n-1),x=[1,factor(1)],y=[2,factor(2)]); forfactored(k=3,n+1, my(e=max(valuation(x[1],2), valuation(k[1],2))); v[k[1]-2]=numdiv(k)*numdiv(x)*(e+2)/(2*e+2); x=y; y=k); v \\ Charles R Greathouse IV, Sep 17 2021
-
Python
from math import prod from sympy import factorint def a(n): ft = factorint(n+1, multiple=True) + factorint(n-1, multiple=True) return prod((e + 1) for e in (ft.count(f) for f in set(ft))) print([a(n) for n in range(2, 82)]) # Michael S. Branicky, Sep 17 2021
Formula
a(n) = 2 * A129296(n).
Sum_{k=2..n} a(k) ~ (6/Pi^2) * n*log(n)^2 (Dudek, 2016). - Amiram Eldar, Apr 07 2023
Comments