[go: up one dir, main page]

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!)
A354885 Numbers that are palindromes in both ternary and balanced ternary representations. 2
0, 1, 4, 10, 13, 16, 28, 40, 52, 82, 91, 112, 121, 160, 244, 280, 328, 364, 484, 730, 757, 820, 847, 976, 1003, 1066, 1093, 1312, 1456, 2188, 2296, 2440, 2548, 2920, 3028, 3172, 3280, 3904, 4372, 6562, 6643, 6832, 6913, 7300, 7381, 7570, 7651, 8752, 8833, 9022 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
4 is a term since its ternary and balanced ternary representation are both 11 which is a palindrome.
16 is a term since its ternary representation is 121 and its balanced ternary representation (with 2 standing for the -1 digit) is 1221, and both are palindromes.
MATHEMATICA
Select[Range[0, 10^4], PalindromeQ[IntegerDigits[#, 3]] && PalindromeQ @ balTernDigits[#] &] (* using balTernDigits by Robert G. Wilson v at A134027 *)
PROG
(PARI) is(n) = {my (t=digits(n, 3)); if (t==Vecrev(t), my (b=[], d); while (n, b=concat(d=[0, 1, -1][1+n%3], b); n=(n-d)/3); b==Vecrev(b), 0)} \\ Rémy Sigrist, Jun 10 2022
CROSSREFS
Intersection of A014190 and A134027.
Subsequences: A003462, A034472 \ {2}, A354886.
Sequence in context: A259725 A260936 A043001 * A191195 A310347 A310348
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jun 10 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 August 29 18:55 EDT 2024. Contains 375518 sequences. (Running on oeis4.)