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.
%I A285055 #10 May 10 2017 05:32:30 %S A285055 1,2,4,5,12,8,22,11,24,24,64,18,78,44,38,31,172,48,184,50,74,128,334, %T A285055 38,236,156,192,96,474,76,442,103,214,344,194,106,672,368,242,102,904, %U A285055 148,904,278,218,668,1522,102,910,472,518,320,1728,384,558,200,614,948 %N A285055 Sum of the cycle lengths of the elements 0,1,...n-1, in Zn under multiplication. %e A285055 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 A285055 The triangle of the cycle lengths is: %e A285055 1 ; %e A285055 1, 1 ; %e A285055 1, 1, 2 ; %e A285055 1, 1, 1, 2 ; %e A285055 1, 1, 4, 4, 2 ; %e A285055 1, 1, 2, 1, 1, 2 ; %e A285055 1, 1, 3, 6, 3, 6, 2 ; %e A285055 1, 1, 1, 2, 1, 2, 1, 2 ; %e A285055 1, 1, 6, 1, 3, 6, 1, 3, 2 ; %e A285055 1, 1, 4, 4, 2, 1, 1, 4, 4, 2 ; %p A285055 A285055Tr := proc(n,m) %p A285055 local a,nmap,cyc ; %p A285055 nmap := n ; %p A285055 cyc := [n] ; %p A285055 for a from 1 do %p A285055 nmap := modp(nmap*n,m) ; %p A285055 if member(nmap,cyc,'i') then %p A285055 return nops(cyc)-i+1; %p A285055 else %p A285055 cyc := [op(cyc),nmap] ; %p A285055 end if; %p A285055 end do: %p A285055 end proc: %p A285055 A285055 := proc(m) %p A285055 add(A285055Tr(n,m),n=0..m-1) ; %p A285055 end proc: %p A285055 seq(A285055(m),m=1..30) ; # _R. J. Mathar_, May 06 2017 %Y A285055 See A060014 for permutations on n elements. %K A285055 nonn %O A285055 1,2 %A A285055 _Chad Brewbaker_, Apr 08 2017