OFFSET
1,2
COMMENTS
For n>1 a(n) is the determinant of the (n-1) X (n-1) matrix with elements M[i,j] = Prime[i+1] if i=j and 1 otherwise. (See example lines.) - Alexander Adamchuk, Jun 02 2006
Second column of A096294. - Eric Desbiaux, Jun 20 2013
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..350
FORMULA
a(n) = (prime(n)-1)*a(n-1) + A005867(n). - Matthew Vandermast, Jun 06 2004
EXAMPLE
a(2)=3 since 2*3=6 and 2,3,4 have 1 prime factor among (2,3)
3 1 1 1 1 ...
1 5 1 1 1 ...
1 1 7 1 1 ...
1 1 1 11 1 ...
1 1 1 1 13 ...
and so a(2) = 3, a(3) = 3*5 - 1*1 = 14, a(4) = 3*5*7 + 1*1*1 + 1*1*1 - 7*1*1 - 5*1*1 - 3*1*1 = 92, etc.
MATHEMATICA
Table[ Det[ DiagonalMatrix[ Table[ Prime[i+1]-1, {i, 1, n-1} ] ] + 1 ], {n, 1, 20} ] (* Alexander Adamchuk, Jun 02 2006 *)
PROG
(PARI) a(n)=sum(k=1, prod(i=1, n, prime(i)), if(isprime(gcd(k, prod(i=1, n, prime(i)))), 1, 0))
(PARI) a(n) = matdet(matrix(n-1, n-1, j, k, if (j==k, prime(j+1), 1))); \\ after Mathematica; Michel Marcus, Oct 02 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 31 2002
EXTENSIONS
a(7) from Ralf Stephan, Mar 25 2003
a(8)-a(12) from Matthew Vandermast, Jun 06 2004
More terms from Alexander Adamchuk, Jun 02 2006
STATUS
approved