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.

A181099 Exchange rightmost two ternary digits of n > 1; a(0)=0, a(1)=3.

This page as a plain text file.
%I A181099 #28 Jun 12 2025 19:25:08
%S A181099 0,3,6,1,4,7,2,5,8,9,12,15,10,13,16,11,14,17,18,21,24,19,22,25,20,23,
%T A181099 26,27,30,33,28,31,34,29,32,35,36,39,42,37,40,43,38,41,44,45,48,51,46,
%U A181099 49,52,47,50,53,54,57,60,55,58,61,56,59,62,63,66,69,64,67,70,65,68,71,72
%N A181099 Exchange rightmost two ternary digits of n > 1; a(0)=0, a(1)=3.
%C A181099 Self-inverse permutation of natural numbers: a(a(n)) = n.
%H A181099 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>.
%H A181099 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,1,-1).
%F A181099 From _R. J. Mathar_, Oct 12 2010: (Start)
%F A181099 a(n) = a(n-1) + a(n-9) - a(n-10) = 9 *floor(n/9) + 3*(n mod 3) + (floor(n/3) mod 3).
%F A181099 G.f.: x*(3 + 3*x - 5*x^2 + 3*x^3 + 3*x^4 - 5*x^5 + 3*x^6 + 3*x^7 + x^8) / ( (1+x+x^2)*(x^6+x^3+1)*(x-1)^2 ). (End)
%e A181099 a(10) = a(101_3) = 110_3 = 12.
%e A181099 a(20) = a(202_3) = 220_3 = 24.
%e A181099 a(30) = a(1010_3) = 1001_3 = 28.
%t A181099 Join[{0,3,6},Table[FromDigits[Join[Drop[IntegerDigits[n,3],-2],Reverse[Take[IntegerDigits[n,3],-2]]],3],{n,3,80}]] (* _Harvey P. Dale_, Jun 12 2025 *)
%Y A181099 Cf. A007089, A080412.
%K A181099 base,easy,nonn
%O A181099 0,2
%A A181099 _Jonathan Vos Post_, Oct 03 2010
%E A181099 Corrected and extended by _D. S. McNeil_, Oct 06 2010