OFFSET
1,2
REFERENCES
T. Brenner, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
Richard K. Guy, Letter to N. J. A. Sloane, Sep 1989.
MATHEMATICA
Table[cnt=0; Do[m={{a, b}, {c, d}}; If[Det[m, Modulus->p] > 0, cnt++ ], {a, 0, p-1}, {b, 0, p-1}, {c, 0, p-1}, {d, 0, p-1}]; cnt, {p, 37}] (* T. D. Noe, Jan 12 2006 *)
f[p_, e_] := p^(2*e - 1)*(p^(e + 1) + p^e - 1); a[1] = 0; a[n_] := n^4 - Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 31 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n), p, e); n^4 - prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(2*e - 1)*(p^(e + 1) + p^e - 1)); } \\ Amiram Eldar, Oct 31 2023
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from T. D. Noe, Jan 12 2006
STATUS
approved