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.

A352105 Numbers whose maximal tribonacci representation (A352103) is palindromic.

This page as a plain text file.
%I A352105 #11 Mar 07 2022 19:00:18
%S A352105 0,1,3,5,7,8,14,18,23,27,36,40,51,52,62,69,78,88,95,102,110,130,148,
%T A352105 156,176,181,194,211,229,242,246,264,277,294,312,325,326,363,397,411,
%U A352105 448,463,477,514,548,562,599,617,650,674,682,715,739,770,803,827,838,862
%N A352105 Numbers whose maximal tribonacci representation (A352103) is palindromic.
%C A352105 A027084(n) is a term since its maximal tribonacci representation is n-1 1's and no 0's.
%C A352105 The pairs {A008937(3*k+1)-1, A008937(3*k+1)} = {0, 1}, {7, 8}, {51, 52}, ... are consecutive terms in this sequence: the maximal tribonacci representation of A008937(3*k+1)-1 is 3*k 1's and no 0's (except for k=0 where the representation is 0), and the maximal tribonacci representation of A008937(3*k+1) is of the form 100100...1001 with k blocks of 100 followed by a 1 at the end.
%H A352105 Amiram Eldar, <a href="/A352105/b352105.txt">Table of n, a(n) for n = 1..10000</a>
%e A352105 The first 10 terms are:
%e A352105    n  a(n)  A352103(a(n))
%e A352105   --  ----  -------------
%e A352105    1    0               0
%e A352105    2    1               1
%e A352105    3    3              11
%e A352105    4    5             101
%e A352105    5    7             111
%e A352105    6    8            1001
%e A352105    7   14            1111
%e A352105    8   18           10101
%e A352105    9   23           11011
%e A352105   10   27           11111
%t A352105 t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; q[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, True, PalindromeQ[FromDigits[v[[i[[1, 1]] ;; -1]]]]]]; Select[Range[0, 1000], q]
%Y A352105 Cf. A000073, A008937, A352103.
%Y A352105 A027084 is a subsequence.
%Y A352105 Similar sequences: A002113, A006995, A014190, A094202, A331191, A351712, A351717, A352087.
%K A352105 nonn,base
%O A352105 1,3
%A A352105 _Amiram Eldar_, Mar 05 2022