OFFSET
1,3
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
B. Alspach, On point-symmetric tournaments, Canad. Math. Bull., 13 (1970), 317-323. See g(n) as defined on page 322 (NOT on page 317).
B. Alspach, On point-symmetric tournaments, Canad. Math. Bull., 13 (1970), 317-323. [Annotated copy] See g(n) as defined on page 322 (NOT on page 317).
MATHEMATICA
IsLeastPoint[s_, f_] := Module[{t = f[s]}, While[t > s, t = f[t]]; s == t];
C0[n_, k_] := Sum[Boole @ IsLeastPoint[u, Mod[#*k, n]&], {u, 1, n-1}]/2;
IsBidrected[s_, r_, f_] := Module[{t = f[s]}, While[t != s && t != r, t = f[t]]; t == r];
IsC[n_, k_] := Sum[Boole @ IsBidrected[u, n-u, Mod[#*k, n]&], {u, 1, n-1}] == 0;
a[n_] := Module[{m = 2*n + 1}, Sum[If [GCD[m, k] == 1 && IsC[m, k], 2^C0[m, k], 0], {k, 1, m}]/EulerPhi[m]];
Array[a, 40] (* Jean-François Alcover, Jul 02 2018, after Andrew Howroyd *)
PROG
(PARI)
IsLeastPoint(s, f)={my(t=f(s)); while(t>s, t=f(t)); s==t}
C(n, k)=sum(u=1, n-1, IsLeastPoint(u, v->v*k%n))/2;
IsBidrected(s, r, f)={my(t=f(s)); while(t<>s&&t<>r, t=f(t)); t==r}
IsC(n, k)=sum(u=1, n-1, IsBidrected(u, n-u, v->v*k%n))==0;
a(n)=my(m=2*n+1); sum(k=1, m, if (gcd(m, k)==1 && IsC(m, k), 2^C(m, k), 0))/eulerphi(m); \\ Andrew Howroyd, Sep 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Roderick J. Fletcher, Oct 15 1996 (yylee(AT)mail.ncku.edu.tw)
Definition corrected by Andrew Howroyd, Apr 28 2017
Terms a(32) and beyond from Andrew Howroyd, Sep 30 2017
STATUS
approved