login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051864 Sum of transposition distances (divided by 2) present in the permutation produced by inverses of 1..(p-1) computed in Zp, where p is n-th prime. 0
0, 0, 1, 4, 10, 25, 33, 46, 58, 97, 130, 247, 243, 310, 312, 417, 444, 729, 738, 654, 1007, 836, 968, 1095, 1623, 1603, 1720, 1652, 1997, 2143, 2872, 2786, 3123, 2920, 3069, 3534, 4103, 4654, 4130, 4933, 4434, 5355, 5576, 6959, 5915, 5788, 7440, 7994 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..48.

FORMULA

a(n) = sum_of_transposition_distances(n) (see Maple code given below)

EXAMPLE

Inverses of 1 .. 10 in field Z11 are: 1,6,4,3,9,2,8,7,5,10 (e.g. 9*5 = 45 = 1 mod 11) if we count each inverse's "distance from its own position", we get 0+4+1+1+4+4+1+1+4+0 = 20, divided by 2 is 10, so a(5)=10 (11 is the fifth prime).

MAPLE

with(numtheory); sum_of_transposition_distances := proc(n) local p, i; p := ithprime(n); add(abs(op(2, op(1, msolve(i*x=1, p)))-i), i=1..(p-1))/2; end;

MATHEMATICA

a[n_] := Module[{p = Prime[n], x}, Sum[x - i /. Solve[i*x == 1, Modulus -> p] // First // Abs, {i, 1, p - 1}]/2]; Array[a, 50] (* Jean-Fran├žois Alcover, Mar 05 2016 *)

CROSSREFS

Sequence in context: A038783 A127070 A107961 * A111153 A265438 A145368

Adjacent sequences:  A051861 A051862 A051863 * A051865 A051866 A051867

KEYWORD

nonn

AUTHOR

Antti Karttunen, Dec 14 1999

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 11 07:41 EST 2019. Contains 329914 sequences. (Running on oeis4.)