A212240 Number of 2 X 2 matrices M with all terms in {1,...,n} and permanent(M) >= n.
0, 1, 16, 80, 251, 612, 1269, 2354, 4021, 6449, 9844, 14427, 20458, 28203, 37972, 50073, 64876, 82725, 104046, 129222, 158741, 193024, 232607, 277956, 329675, 388248, 454353, 528508, 611435, 703712, 806121, 919242, 1043953, 1180865
Offset: 0
Keywords
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w*x + y*z >= n, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 40]] (* A212240 *) (* Peter J. C. Moses, Apr 13 2012 *)
-
Python
from sympy import divisor_count def A212240(n): return n**4-sum((sum(divisor_count(i+1)*divisor_count(j-i) for i in range(j>>1))<<1)+(divisor_count(j+1>>1)**2 if j&1 else 0) for j in range(1,n-1)) # Chai Wah Wu, Jul 26 2024
Formula
a(n) + A212151(n) = n^4.
Extensions
Offset changed to 0 by Georg Fischer, Feb 03 2022
Comments