login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356823 Tribternary numbers. 2
0, 1, 3, 4, 9, 10, 12, 27, 28, 30, 31, 36, 37, 81, 82, 84, 85, 90, 91, 93, 108, 109, 111, 112, 243, 244, 246, 247, 252, 253, 255, 270, 271, 273, 274, 279, 280, 324, 325, 327, 328, 333, 334, 336, 729, 730, 732, 733, 738, 739, 741, 756, 757, 759, 760, 765, 766, 810, 811, 813, 814, 819 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
These are numbers whose ternary representations consist only of zeros and ones and do not have three consecutive ones.
The sequence of Tribternary numbers can be constructed by writing out the Tribonacci representations of nonnegative integers and then evaluating the result in ternary.
These are Tribbinary numbers written in base 2 and evaluated in base 3.
These numbers are similar to Fibbinary numbers A003714, Fibternary numbers A003726, and Tribbinary numbers A060140.
Tribbinary numbers A060140 are a subsequence.
Subsequence of A005836.
The number of Tribternary numbers less than any power of three is a Tribonacci number.
We can generate this sequence recursively: start with 0 and 1; then, if x is in the sequence add 3x, 9x+1, and 27x+4 to the sequence.
The n-th Tribternary number is divisible by 3 if the n-th term of the Tribonacci word is a. Respectively, the n-th Tribbinary number is of the form 9x+1 if the n-th term of the Tribonacci word is b, and the n-th Tribbinary number is of the form 27x+4 if the n-th term of the Tribonacci word is c.
Every nonnegative integer can be written as a sum of three Tribternary numbers.
Every number has a Tribternary multiple.
LINKS
MATHEMATICA
Select[Range[0, 1000], SequenceCount[IntegerDigits[#, 3], {1, 1, 1}] == 0 && SequenceCount[IntegerDigits[#, 3], {2}] == 0 &]
PROG
(Python)
import heapq
from itertools import islice
def agen(): # generator of terms, using recursion in Comments
x, h = None, [0]
while True:
x, oldx = heapq.heappop(h), x
if x != oldx:
yield x
for t in [3*x, 9*x+1, 27*x+4]: heapq.heappush(h, t)
print(list(islice(agen(), 62))) # Michael S. Branicky, Aug 30 2022
CROSSREFS
Sequence in context: A339658 A344297 A344292 * A345359 A287323 A059985
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova and PRIMES STEP Senior group, Aug 29 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)