A147810 Half the number of divisors of n^2+1.
1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 2, 2, 4, 1, 2, 1, 4, 3, 2, 1, 4, 2, 4, 1, 2, 1, 4, 2, 2, 2, 4, 3, 4, 2, 2, 1, 4, 3, 2, 1, 3, 2, 6, 2, 2, 2, 8, 2, 2, 2, 2, 2, 4, 1, 4, 1, 8, 2, 2, 2, 2, 2, 4, 2, 2, 1, 4, 4, 2, 3, 2, 4, 8, 1, 4, 2, 4, 2, 2, 2, 4, 3, 8, 1, 2, 2, 4, 2, 4, 1, 4, 2, 6, 1, 2, 2, 4, 4, 6
Offset: 1
Examples
For n = 7 the a(7) = 3 solutions are (17,12), (32,9), (57,8). For n = 13 the a(13) = 4 solutions are (30,23), (47,18), (98,15), (183,14). - _Zhining Yang_, May 18 2023
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Shouen Wang, The general term formula of an integer sequence.
Programs
-
Maple
with(numtheory); A147810:=n->tau(n^2+1)/2; seq(A147810(n), n=1..100); # Wesley Ivan Hurt, Mar 10 2014
-
Mathematica
Table[c=0; Do[If[i<=j && i*j==n^2+1, c++], {i, t=Divisors[n^2+1]}, {j, t}]; c, {n, 100}] (* Michel Lagneau, Mar 10 2014 *)
-
PARI
A147810(n)=numdiv(n^2+1)/2
-
Python
from sympy import divisor_count def A147810(n): return divisor_count(n**2+1)>>1 if n else 1 # Chai Wah Wu, Jul 09 2023
Formula
Sum_{k=1..n} a(k) ~ c * n * log(n), where c = 3/(2*Pi) = 0.477464... (A093582). - Amiram Eldar, Dec 01 2023
Comments