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.

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

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