cp's OEIS Frontend

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.

A080413 Take the rightmost three binary digits of n (for n<4 padded with leading zeros) and rotate left 1 digit.

This page as a plain text file.
%I A080413 #15 Jul 03 2025 15:26:16
%S A080413 0,2,4,6,1,3,5,7,8,10,12,14,9,11,13,15,16,18,20,22,17,19,21,23,24,26,
%T A080413 28,30,25,27,29,31,32,34,36,38,33,35,37,39,40,42,44,46,41,43,45,47,48,
%U A080413 50,52,54,49,51,53,55,56,58,60,62,57,59,61,63,64,66,68,70,65,67,69,71,72
%N A080413 Take the rightmost three binary digits of n (for n<4 padded with leading zeros) and rotate left 1 digit.
%H A080413 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%H A080413 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,1,-1).
%F A080413 For n>7: a(n) = 8*floor(n/8) + a(n mod 8).
%F A080413 A permutation of natural numbers with inverse = A080414: A080414(a(n))=n, a(A080414(n))=n.
%F A080413 a(a(n))=A080414(n), A080414(A080414(n))=a(n), a(a(a(n)))=n.
%e A080413 a(2)=a('010')='100'=4; a(3)=a('011')='110'=6; a(4)=a('100')='001'=1; a(5)=a('101')='011'=3;
%e A080413 a(20)=a('10'100')='10'001'=17; a(21)=a('10'101')='10'011'=19.
%t A080413 LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 2, 4, 6, 1, 3, 5, 7, 8}, 73] (* _Georg Fischer_, Jul 03 2025 *)
%o A080413 (Python)
%o A080413 def A080413(n): return ((n&3)<<1)+bool(n&4)+(n&-8) # _Chai Wah Wu_, Jan 21 2023
%Y A080413 Cf. A007088, A004442, A064429, A080412, A080414.
%K A080413 nonn,easy
%O A080413 0,2
%A A080413 _Reinhard Zumkeller_, Feb 17 2003