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.

A048787 Write n in base 3 then rotate left one place.

This page as a plain text file.
%I A048787 #22 May 09 2024 13:26:23
%S A048787 1,2,1,4,7,2,5,8,1,4,7,10,13,16,19,22,25,2,5,8,11,14,17,20,23,26,1,4,
%T A048787 7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,
%U A048787 76,79,2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68
%N A048787 Write n in base 3 then rotate left one place.
%C A048787 A={a(n)} is self-similar in the sense that the subsequence remaining after deleting the first occurrence of each integer is identical to the original sequence A (Kimberling's "upper-trimming" operation).
%H A048787 Indranil Ghosh, <a href="/A048787/b048787.txt">Table of n, a(n) for n = 1..59049</a>
%e A048787 a(33)=19 since 33 = 1020(base 3) -> 0201(base 3) = 19.
%t A048787 Table[ FromDigits[ RotateLeft[ IntegerDigits[n, 3]], 3], {n, 1, 76}] (* _Zerinvary Lajos_, Mar 25 2007 *)
%o A048787 (Python)
%o A048787 def A048787(n):
%o A048787     x=A007089(n)
%o A048787     return int (x[1:]+x[0],3) # _Indranil Ghosh_, Feb 08 2017
%Y A048787 Cf. A255588-A255594, A255689-A255693.
%K A048787 nonn,base
%O A048787 1,2
%A A048787 _John W. Layman_ and Anthony C. Hill (hilla(AT)hotmail.com)