[go: up one dir, main page]

login
A331220
Positive numbers of the form u * v where the ternary representations of u and of v have the same number of digits d for d = 0..2.
5
1, 4, 9, 16, 25, 35, 36, 49, 64, 81, 100, 120, 121, 144, 165, 169, 196, 209, 224, 225, 231, 256, 285, 289, 308, 315, 324, 352, 361, 391, 399, 400, 425, 441, 480, 484, 529, 575, 576, 625, 676, 729, 784, 840, 841, 900, 957, 961, 1008, 1024, 1080, 1088, 1089
OFFSET
1,2
COMMENTS
In other words, the terms of this sequence are squares or the products of two ternary anagrams.
Leading zeros are ignored.
If m belongs to the sequence, then 9*m also belongs to the sequence.
LINKS
EXAMPLE
The ternary representations of 5 and 7 are "12" and "21", respectively.
So 5 and 7 are ternary anagrams, and 35 = 7*5 belongs to the sequence.
PROG
(PARI) is(n, base=3) = fordiv (n, d, if (vecsort(digits(d, base))==vecsort(digits(n/d, base)), return (1))); return (0)
CROSSREFS
Cf. A331219 (binary analog), A331221 (decimal analog), A331268, A331269.
Sequence in context: A010409 A010457 A244833 * A004120 A052118 A070470
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 12 2020
STATUS
approved