A163912 Least common multiple of all cycle sizes in range [A000302(n-1)..A024036(n)] of permutation A163355/A163356.
1, 2, 6, 24, 36, 288, 432, 1728, 2592, 31104, 15552
Offset: 0
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.
A003188(n) = bitxor(n, n>>1); A057300(n) = { my(t=1,s=0); while(n>0, if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); }; A163356(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); (((((2+(i%2))^d)%5)-1)*f) + if(3==d,f-1-A163356(r),A057300(A163356(r)))); \\ Antti Karttunen, Apr 14 2018 A302844(n) = A003188(A163356(n));
A057300 := proc(n) option remember; `if`(n=0, 0, procname(iquo(n, 4, 'r'))*4+[0, 2, 1, 3][r+1]) end proc: A163355 := proc(n) option remember ; local d,base4,i,r ; if n <= 1 then return n ; end if; base4 := convert(n,base,4) ; d := op(-1,base4) ; i := nops(base4)-1 ; r := n-d*4^i ; if ( d=1 and type(i,even) ) or ( d=2 and type(i,odd)) then 4^i+procname(A057300(r)) ; elif d= 3 then 2*4^i+procname(A057300(r)) ; else 3*4^i+procname(4^i-1-r) ; end if; end proc: seq(A163355(n),n=0..100) ; # R. J. Mathar, Nov 22 2023
A057300(n) = { my(t=1, s=0); while(n>0, if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); }; A163355(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); if(((1==d)&&!(i%2))||((2==d)&&(i%2)), f+A163355(A057300(r)), if(3==d,f+f+A163355(A057300(r)), (3*f)+A163355(f-1-r)))); \\ Antti Karttunen, Apr 14 2018
[m(1)=0 0 1 1, m'(1)= 0 1 10] [m(2) =0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, m'(2)=0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3].
void h(unsigned int *x, unsigned int *y, unsigned int l){ x[0] = y[0] = 0; unsigned int *t = NULL; unsigned int n = 0, k = 0; for(unsigned int i = 1; i>(2*n)){ case 1: x[i] = y[i&k]; y[i] = x[i&k]+(1< Jared Rager, Jan 09 2021 */ (C++) See Fxtbook link.
Comments