OFFSET
0,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..1000 (terms 0..151 from Indranil Ghosh)
EXAMPLE
For n = 4, a few of the possible matrices are [0,1;3,3], [0,1;3,4], [0,2;1,0], [0,2;1,1], [0,2;1,2], [2,0;1,1], [2,0;2,1], [2,0;3,1], [2,0;4,1], [2,1;0,1], [4,3;1,1], [4,3;1,2], [4,3;1,4], [4,3;3,1], [4,3;3,2], [3,2;2,3], [3,2;4,1], [3,2;4,3], [3,3;0,1], [3,3;1,0], ... There are 139 possibilities. So, a(4) = 139.
PROG
(Python)
from sympy import isprime
def t(n):
....s=0
....for a in range(0, n+1):
........for b in range(0, n+1):
............for c in range(0, n+1):
................for d in range(0, n+1):
....................if isprime(a*d+b*c)==True:
........................s+=1
....return s
for i in range(0, 152):
....print str(i)+" "+str(t(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 20 2017
STATUS
approved