The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A338086 Duplicate the ternary digits of n, so each 0, 1 or 2 becomes 00, 11 or 22 respectively. 7
 0, 4, 8, 36, 40, 44, 72, 76, 80, 324, 328, 332, 360, 364, 368, 396, 400, 404, 648, 652, 656, 684, 688, 692, 720, 724, 728, 2916, 2920, 2924, 2952, 2956, 2960, 2988, 2992, 2996, 3240, 3244, 3248, 3276, 3280, 3284, 3312, 3316, 3320, 3564, 3568, 3572, 3600, 3604 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS Also, numbers whose ternary digit runs are all even lengths (including 0 reckoned as no digits at all). Also, change ternary digits 0,1,2 to base 9 digits 0,4,8, and hence numbers which can be written in base 9 using only digits 0,4,8. Digit duplication 00,11,22 can be compared to A037314 which is 0 above each so 00,01,02, or A208665 which is 0 below each so 00,10,20. Duplication is the sum of these, or any one is a suitable multiple of another (*3, *4, etc). This sequence is the points on the X=Y diagonal of the ternary Z-order curve (see example table in A163328). The Z-order curve takes a point number p and splits its ternary digits alternately to X and Y coordinates so X(p) = A163325(p) and Y(p) = A163326(p). Duplicate digits in a(n) are the diagonal X(a(n)) = Y(a(n)) = n. LINKS Kevin Ryde, Table of n, a(n) for n = 0..6560 FORMULA a(n) = A037314(n) + A208665(n) = 4*A037314(n) = (4/3)*A208665(n). a(n) = 4*Sum_{i=0..k} d[i]*9^i where the ternary expansion of n is n = Sum_{i=0..k} d[i]*3^i with digits d[i]=0,1,2. EXAMPLE n=73 is ternary 2201 which duplicates to 22220011 ternary = 8804 base 9 = 6484 decimal. PROG (PARI) a(n) = fromdigits(digits(n, 3), 9)<<2; (Python) from gmpy2 import digits def A338086(n): return int(''.join(d*2 for d in digits(n, 3)), 3) # Chai Wah Wu, May 07 2022 CROSSREFS Cf. A037314, A208665, A163325, A163326, A163328. Cf. A020331 (ternary concatenation). Digit duplication in other bases: A001196, A338754. Sequence in context: A158863 A074736 A044829 * A033001 A269012 A149110 Adjacent sequences: A338083 A338084 A338085 * A338087 A338088 A338089 KEYWORD base,nonn AUTHOR Kevin Ryde, Oct 09 2020 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.

Last modified October 4 15:21 EDT 2023. Contains 365885 sequences. (Running on oeis4.)