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.

A337305 a(n) is the greatest number m not yet in the sequence such that the ternary expansions of n and of m have the same runs of consecutive equal digits (up to order but with multiplicity).

This page as a plain text file.
%I A337305 #16 Jan 09 2021 02:09:16
%S A337305 0,1,2,3,4,7,6,5,8,9,10,21,12,13,22,19,16,25,18,15,20,11,14,23,24,17,
%T A337305 26,27,28,63,30,37,64,57,48,75,36,31,66,39,40,67,58,49,76,55,46,69,34,
%U A337305 43,70,73,52,79,54,45,56,33,42,65,60,61,74,29,32,59,38,41
%N A337305 a(n) is the greatest number m not yet in the sequence such that the ternary expansions of n and of m have the same runs of consecutive equal digits (up to order but with multiplicity).
%C A337305 This sequence is the base 3 analog of A337304.
%C A337305 This sequence is a self-inverse permutation of the nonnegative integers.
%H A337305 Rémy Sigrist, <a href="/A337305/b337305.txt">Table of n, a(n) for n = 0..6561</a>
%H A337305 Rémy Sigrist, <a href="/A337305/a337305.gp.txt">PARI program for A337305</a>
%H A337305 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A337305 For n = 144:
%e A337305 - the ternary representation of 144 is "12100",
%e A337305 - the corresponding runs of consecutive equal digits are: "1", "2", "1", "00",
%e A337305 - there are five numbers k with the same multiset of runs:
%e A337305     k    ter(k)
%e A337305     ---  -------
%e A337305      86  "10012"
%e A337305      88  "10021"
%e A337305     136  "12001"
%e A337305     144  "12100"
%e A337305     190  "21001"
%e A337305 - so a(86) = 190,
%e A337305      a(88) = 144,
%e A337305      a(136) = 136,
%e A337305      a(144) = 88,
%e A337305      a(190) = 86.
%o A337305 (PARI) See Links section.
%Y A337305 Cf. A331275, A337304.
%K A337305 nonn,base
%O A337305 0,3
%A A337305 _Rémy Sigrist_, Aug 22 2020