cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A114533 Permanent of the n X n matrix with numbers prime(1),prime(2),...,prime(n^2) in order across rows.

This page as a plain text file.
%I A114533 #32 Apr 08 2025 18:27:31
%S A114533 1,2,29,3746,1919534,2514903732,6571874957648,30662862975835376,
%T A114533 228731722381012564816,2641049525155781555257440,
%U A114533 43818773386947889568479502592,1014966115357067575070490776083200,31412851866841234377483875199638978304
%N A114533 Permanent of the n X n matrix with numbers prime(1),prime(2),...,prime(n^2) in order across rows.
%C A114533 Previous name was : "a(n) = permanent of the n X n matrix M defined as follows: if we concatenate the rows of M to form a vector v of length n^2, v_i is the i-th prime number".
%H A114533 Vaclav Kotesovec, <a href="/A114533/b114533.txt">Table of n, a(n) for n = 0..36</a> (terms 0..20 from Alois P. Heinz)
%p A114533 with(LinearAlgebra):
%p A114533 a:= n->`if`(n=0, 1, Permanent(Matrix(n, (i, j)->ithprime((i-1)*n+j)))):
%p A114533 seq(a(n), n=0..12);  # _Alois P. Heinz_, Dec 23 2013
%t A114533 a[n_] := Permanent[Table[Prime[(i-1)*n+j], {i, 1, n}, {j, 1, n}]]; a[0]=1; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 12}] (* _Jean-François Alcover_, Jan 07 2016, adapted from Maple *)
%t A114533 Join[{1},Table[Permanent[Partition[Prime[Range[n^2]],n]],{n,15}]] (* _Harvey P. Dale_, Aug 03 2019 *)
%o A114533 (PARI)
%o A114533 permRWN(a)=n=matsize(a)[1]; if(n==1,return(a[1,1])); n1=n-1; sg=1; m=1; nc=0; in=vector(n); x=in; for(i=1,n,x[i]=a[i,n]-sum(j=1,n,a[i,j])/2); p=prod(i=1,n,x[i]); while(m,sg=-sg; j=1; if((nc%2)!=0,j++; while(in[j-1]==0,j++)); in[j]=1-in[j]; z=2*in[j]-1; nc+=z; m=nc!=in[n1]; for(i=1,n,x[i]+=z*a[i,j]); p+=sg*prod(i=1,n,x[i])); return(2*(2*(n%2)-1)*p)
%o A114533 for(n=1,19,a=matrix(n,n,i,j,prime((i-1)*n+j)); print1(permRWN(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 11 2007
%o A114533 (PARI)
%o A114533 permRWNb(a)=n=matsize(a)[1];if(n==1,return(a[1,1]));sg=1;in=vectorv(n);x=in;x=a[,n]-sum(j=1,n,a[,j])/2;p=prod(i=1,n,x[i]);for(k=1,2^(n-1)-1,sg=-sg;j=valuation(k,2)+1;z=1-2*in[j];in[j]+=z;x+=z*a[,j];p+=prod(i=1,n,x[i],sg));return(2*(2*(n%2)-1)*p)
%o A114533 for(n=1,23,a=matrix(n,n,i,j,prime((i-1)*n+j));print1(permRWNb(a)",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 15 2007
%o A114533 (PARI) {a(n) = matpermanent(matrix(n, n, i, j, prime((i-1)*n+j)))}
%o A114533 for(n=0, 25, print1(a(n), ", ")) \\ _Vaclav Kotesovec_, Aug 13 2021
%Y A114533 Cf. A067276, A232773.
%K A114533 nonn
%O A114533 0,2
%A A114533 _Simone Severini_, Feb 15 2006
%E A114533 More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 11 2007
%E A114533 More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 15 2007
%E A114533 New name from _Michel Marcus_, Nov 30 2013
%E A114533 a(0) inserted and a(12) by _Alois P. Heinz_, Dec 23 2013