login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sum of the cycle lengths of the elements 0,1,...n-1, in Zn under multiplication.
1

%I #10 May 10 2017 05:32:30

%S 1,2,4,5,12,8,22,11,24,24,64,18,78,44,38,31,172,48,184,50,74,128,334,

%T 38,236,156,192,96,474,76,442,103,214,344,194,106,672,368,242,102,904,

%U 148,904,278,218,668,1522,102,910,472,518,320,1728,384,558,200,614,948

%N Sum of the cycle lengths of the elements 0,1,...n-1, in Zn under multiplication.

%e For n=3, 0->0 (cycle length 1), 1->1 (cycle length 1) and 2->1->2 (cycle length 2); 1+1+2 = 4.

%e The triangle of the cycle lengths is:

%e 1 ;

%e 1, 1 ;

%e 1, 1, 2 ;

%e 1, 1, 1, 2 ;

%e 1, 1, 4, 4, 2 ;

%e 1, 1, 2, 1, 1, 2 ;

%e 1, 1, 3, 6, 3, 6, 2 ;

%e 1, 1, 1, 2, 1, 2, 1, 2 ;

%e 1, 1, 6, 1, 3, 6, 1, 3, 2 ;

%e 1, 1, 4, 4, 2, 1, 1, 4, 4, 2 ;

%p A285055Tr := proc(n,m)

%p local a,nmap,cyc ;

%p nmap := n ;

%p cyc := [n] ;

%p for a from 1 do

%p nmap := modp(nmap*n,m) ;

%p if member(nmap,cyc,'i') then

%p return nops(cyc)-i+1;

%p else

%p cyc := [op(cyc),nmap] ;

%p end if;

%p end do:

%p end proc:

%p A285055 := proc(m)

%p add(A285055Tr(n,m),n=0..m-1) ;

%p end proc:

%p seq(A285055(m),m=1..30) ; # _R. J. Mathar_, May 06 2017

%Y See A060014 for permutations on n elements.

%K nonn

%O 1,2

%A _Chad Brewbaker_, Apr 08 2017