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.

A367607 Comma-successor to n working in base 3, and written in base 3, or -1 if n has no successor.

This page as a plain text file.
%I A367607 #15 Dec 11 2023 23:10:25
%S A367607 12,100,11,-1,110,22,102,120,101,112,201,111,122,211,121,210,221,202,
%T A367607 220,1000,212,-1,1010,222,1002,1020,1001,1012,1100,1011,1022,1110,
%U A367607 1021,1102,1120,1101,1112,1200,1111,1122,1210,1121,1202,1220,1201,1212,2001,1211,1222,2011,1221,2010,2021,2002,2020,2101,2012,2100
%N A367607 Comma-successor to n working in base 3, and written in base 3, or -1 if n has no successor.
%C A367607 This is a base-3 analog of A367338.
%H A367607 Michael S. Branicky, <a href="/A367607/b367607.txt">Table of n, a(n) for n = 1..10000</a>
%o A367607 (Python)
%o A367607 from sympy.ntheory.factor_ import digits
%o A367607 def a(n):
%o A367607     b = n + 3*(n%3)
%o A367607     return next((int("".join(map(str, d3))) for y in [1, 2] if (d3:=digits(b+y, 3)[1:])[0] == y), -1)
%o A367607 print([a(n) for n in range(1, 61)]) # _Michael S. Branicky_, Dec 11 2023
%Y A367607 Cf. A121085, A007089, A367338, A367355, A367356, A367606, A367608, A367609.
%K A367607 sign,base
%O A367607 1,1
%A A367607 _N. J. A. Sloane_, Dec 11 2023