login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278348 Number of 2 X 2 singular integer matrices with elements from {0,...,n} with no elements repeated. 2
0, 0, 0, 0, 0, 0, 16, 16, 32, 40, 72, 72, 136, 136, 184, 248, 304, 304, 408, 408, 536, 632, 712, 712, 920, 968, 1064, 1168, 1360, 1360, 1664, 1664, 1848, 2008, 2136, 2328, 2696, 2696, 2840, 3032, 3432, 3432, 3880, 3880, 4200, 4592, 4768, 4768, 5336, 5456, 5824 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
If p is prime then a(p) = a(p-1). - Robert G. Wilson v, Nov 20 2016
LINKS
Indranil Ghosh, Charles R Greathouse IV and Chai Wah Wu, Table of n, a(n) for n = 0..10000 (first 101 terms from Ghosh, next 1900 terms from Charles R Greathouse IV)
Charles R Greathouse IV, C program for computing this sequence
MATHEMATICA
f[n_] := f[n] = Block[{a = 1, b, c, s = 0}, While[b = a + 1; a < n + 1, While[c = b + 1; b < n + 1, While[c < n + 1, If[a != b && a != c && a != n && b != c && b != n && c != n && a*n == b*c, s++]; c++]; b++]; a++]; 8 s + f[n - 1]]; f[0] = 0; Array[f, 51] (* or *)
g[n_] := g[n] = Block[{c = 0, k = 1}, While[k < n, c += Count[ Times @@@ Select[ Tuples[ Rest@ Most@ Divisors[k*n], 2], #[[1]] < #[[2]] < n &], k*n]; k++]; c]; 8*Accumulate[ Array[g, 51]] (* much faster but both are recursive *) (* Robert G. Wilson v, Nov 20 2016 *)
PROG
(Python)
def p(n):
s=0
for a in range(n+1):
for b in range(n+1):
for c in range(n+1):
for d in range(n+1):
if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d):
if a*d==b*c:
s+=1
return s
for i in range(101):
print(str(i)+" "+str(p(i)))
(PARI) try(a, b, c, n)=my(d=b*c/a); denominator(d)==1 && d<=n && d!=a && d!=b && d!=c
a(n)=2*sum(a=3, n, sum(b=2, a-1, sum(c=1, b-1, try(a, b, c, n) + try(c, a, b, n) + try(b, a, c, n)))) \\ Charles R Greathouse IV, Nov 20 2016
(C) See Greathouse link.
CROSSREFS
Cf. A059306 (where in the matrices each element can be present multiple times).
Sequence in context: A248764 A238409 A040241 * A022350 A226068 A230977
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Nov 18 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 15:49 EDT 2024. Contains 374612 sequences. (Running on oeis4.)