OFFSET
0,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..1000 (terms 0..186 from Indranil Ghosh)
EXAMPLE
For n = 3, a few of the possible matrices are [1,0;3,3], [1,1;0,2], [1,1;0,3], [1,1;1,3], [1,2;0,2], [1,2;0,3], [1,3;0,2], [1,3;0,3], [2,0;0,1], [2,0;1,1], [2,0;2,1], [2,0;3,1], [2,1;0,1], [2,1;1,2], [2,1;1,3], [3,1;3,2], [3,2;0,1], [3,2;1,3], [3,2;2,2], [3,2;2,3], ... There are 46 possibilities.
Here each of the matrices M is defined as M = [a,b;c,d], where a= M[1][1], b = M[1][2], c = M[2][1] and d = M[2][2]. So, a(3) = 46.
PROG
(Python)
from sympy import isprime
def t(n):
s=0
for a in range(n+1):
for d in range(n+1):
ad = a * d
for c in range(n+1):
for b in range(n+1):
if isprime(ad-b*c):
s+=1
return s
for i in range(187):
print(str(i)+" "+str(t(i)))
(Sage)
def A281315(n):
T = Tuples([i for i in range(n+1)], 4); i = 0
for t in T: i += is_prime(t[0]*t[3]-t[1]*t[2])
return i
[A281315(n) for n in range(20)] # Peter Luschny, Jul 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 20 2017
STATUS
approved