OFFSET
1,2
LINKS
Peter Luschny, Table of n, a(n) for n = 1..100
EXAMPLE
The matrix begins:
1 1 1 1 1 1 1 ...
1 4 1 1 1 1 1 ...
1 1 6 1 1 1 1 ...
1 1 1 8 1 1 1 ...
1 1 1 1 9 1 1 ...
1 1 1 1 1 10 1 ...
MAPLE
A067546 := proc(n) local np, f, a; with(linalg);
np := proc(n) option remember; if n <= 1 then 1 else for a from np(n-1)+1 do
if not isprime(a) then return(a) fi od fi end:
f := (i, j) -> `if`(i=j, np(i), 1); det(matrix(n, n, f)) end:
seq(A067546(i), i=1..18); # Peter Luschny, May 28 2013
MATHEMATICA
NonPrime[ n_Integer ] := FixedPoint[ n + PrimePi[ # ] &, n + PrimePi[ n ] ]; Table[ Det[ DiagonalMatrix[ Table[ NonPrime[ i ] - 1, {i, 1, n} ] ] + 1 ], {n, 1, 20} ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 28 2002
STATUS
approved