This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A347191 #43 Apr 07 2023 04:29:10 %S A347191 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, %T A347191 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, %U A347191 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 %N A347191 Number of divisors of n^2-1. %C A347191 Inspired by problem A1885 in Diophante (see link). %C A347191 As n^2-1 > 0 is never square, all terms are even. %C A347191 a(n) = 2 iff n = 2. %C A347191 a(n) = 4 iff n = 3 or iff n is average of twin prime pairs 'n-1' and 'n+1'; i.e. n is a member of ({3} Union A014574) or equivalently n is a term of A129297 \ {0,1,2}. %C A347191 a(n) = 6 iff n is such that the two adjacent integers of n are a prime and a square of another prime: 8, 10, 24, 48, 168, 360, ... (A347194). %H A347191 Amiram Eldar, <a href="/A347191/b347191.txt">Table of n, a(n) for n = 2..10000</a> %H A347191 Diophante, <a href="http://www.diophante.fr/problemes-par-themes/arithmetique-et-algebre/a1-pot-pourri/3848-a1885-caches-derriere-leurs-diviseurs">A1885, Cachés derrière leurs diviseurs</a> (in French). %H A347191 Adrian W. Dudek, <a href="https://doi.org/10.1017/S0004972715001136">On the number of divisors of n^2-1</a>, Bulletin of the Australian Mathematical Society, Vol. 93, No. 2 (2016), pp. 194-198; <a href="http://arxiv.org/abs/1507.08893">arXiv preprint</a>, arXiv:1507.08893 [math.NT], 2015. %F A347191 a(n) = A000005(A005563(n-1)). %F A347191 a(n) = 2 * A129296(n). %F A347191 Sum_{k=2..n} a(k) ~ (6/Pi^2) * n*log(n)^2 (Dudek, 2016). - _Amiram Eldar_, Apr 07 2023 %e A347191 a(5) = tau(5^2-1) = tau(24) = 8. %e A347191 a(18) = tau(18^2-1) = tau(17*19) = 4, 18 is average of twin primes 17 and 19. %p A347191 with(numtheory): %p A347191 seq(tau(n^2-1), n=2..81); %t A347191 a[n_] := Length[Divisors[n^2 - 1]]; Table[a[n], {n, 2, 81}] (* _Robert P. P. McKone_, Aug 22 2021 *) %t A347191 Table[DivisorSigma[0, n^2 - 1], {n, 2, 100}] (* _Vaclav Kotesovec_, Aug 23 2021 *) %o A347191 (PARI) a(n) = numdiv(n^2-1); \\ _Michel Marcus_, Aug 23 2021 %o A347191 (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 %o A347191 (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 %o A347191 (Python) %o A347191 from math import prod %o A347191 from sympy import factorint %o A347191 def a(n): %o A347191 ft = factorint(n+1, multiple=True) + factorint(n-1, multiple=True) %o A347191 return prod((e + 1) for e in (ft.count(f) for f in set(ft))) %o A347191 print([a(n) for n in range(2, 82)]) # _Michael S. Branicky_, Sep 17 2021 %Y A347191 Cf. A000005, A005563, A014574, A129296, A129297. %Y A347191 Cf. A347192 (records), A347193 (smallest k with a(k) = n), A347194 (a(n)=6). %K A347191 nonn %O A347191 2,1 %A A347191 _Bernard Schott_, Aug 22 2021