login
An intermediate sequence for nonisomorphic circulant p^2-tournaments, indexed by odd primes p.
4

%I #24 Aug 30 2019 07:13:33

%S 2,4,12,104,344,4096,14572,190652,9586984,35791472,1908874584,

%T 27487790720,104715393912,1529755308212,86607685141744,

%U 4969489243995032,19215358410149344,1117984489315857512,16865594581677305360,65588423373189982912

%N An intermediate sequence for nonisomorphic circulant p^2-tournaments, indexed by odd primes p.

%C Number of subsets of {1, ..., p} with product = 1 mod p, where p is the n-th prime. - _Charles R Greathouse IV_, Jun 06 2013

%H Charles R Greathouse IV, <a href="/A038791/b038791.txt">Table of n, a(n) for n = 2..100</a>

%H M. Klin, V. A. Liskovets and R. Poeschel, <a href="http://www.mat.univie.ac.at/~slc/wpapers/s36klp.html">Analytical enumeration of circulant graphs with prime-squared vertices</a>, Sem. Lotharingien de Combin., B36d, 1996, 36 pages.

%F a(p^2) = A038790(p^2) - A038789(p^2) + A038792(p^2).

%t has[p_] := Module[{v, u}, v = Table[0, {p-1}]; v[[1]] = 1; For[n = 2, n <= p-1, n++, u = Table[0, {p-1}]; For[j = 1, j <= p-1, j++, u[[Mod[j*n, p]]] += v[[j]]]; v += u]; 2*v[[1]]];

%t a[n_] := has[Prime[n]];

%t Table[a[n], {n, 2, 21}] (* _Jean-François Alcover_, Aug 30 2019, after _Charles R Greathouse IV_ *)

%o (PARI) has(p)=my(v=vector(p-1),u); v[1]=1; for(n=2,p-1,u=vector(p-1); for(j=1,p-1, u[j*n%p]+=v[j]);v+=u); 2*v[1]

%o a(n)=has(prime(n)) \\ _Charles R Greathouse IV_, Jun 06 2013

%Y Cf. A038787.

%K nonn,easy

%O 2,1

%A _N. J. A. Sloane_, May 04 2000

%E More terms from _Valery A. Liskovets_, May 09 2001

%E a(12)-a(20) from _Charles R Greathouse IV_, Jun 06 2013