[go: up one dir, main page]

login
Search: a257831 -id:a257831
     Sort: relevance | references | number | modified | created      Format: long | short | data
Replace decimal digits with their binary values and convert back to decimal representation.
+10
4
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 6, 7, 12, 13, 14, 15, 24, 25, 4, 5, 10, 11, 20, 21, 22, 23, 40, 41, 6, 7, 14, 15, 28, 29, 30, 31, 56, 57, 8, 9, 18, 19, 36, 37, 38, 39, 72, 73, 10, 11, 22, 23, 44, 45, 46, 47, 88, 89, 12, 13, 26, 27, 52, 53, 54, 55, 104, 105, 14, 15, 30, 31, 60, 61, 62
OFFSET
0,3
COMMENTS
m is a local maximum iff m == 9 modulo 10 (see A017377).
A257831 seen as binary numbers: A007088(a(n)) = A257831(n). - Reinhard Zumkeller, May 10 2015
LINKS
EXAMPLE
n=27 -> '2''7' -> '10''111' -> '10111' -> 23: a(27)=23.
See also A257831.
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[#, 2]&/@IntegerDigits[n]], 2], {n, 80}] (* Harvey P. Dale, Aug 30 2014 *)
PROG
(Haskell)
import Data.Maybe (mapMaybe)
a080719 = foldr (\b v -> 2 * v + b) 0 .
concat . mapMaybe (flip lookup bin) . a031298_row
where bin = zip [0..9] a030308_tabf
-- Reinhard Zumkeller, May 10 2015
(Python)
def A080719(n):
....return int(''.join((format(int(d), 'b') for d in str(n))), 2)
# Chai Wah Wu, May 10 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Mar 06 2003
EXTENSIONS
a(0)=0 prepended and offset changed by Reinhard Zumkeller, May 10 2015
STATUS
approved
Square array read by antidiagonals: T(n, k) = 1 if the digits of p = n*k in base 2 are exactly the same as the digits of p when considering the base-2 representations of n, k and p as base-10 numbers, otherwise T(n, k) = 0.
+10
1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0
COMMENTS
As n * k = k * n, the array is symmetric.
EXAMPLE
In base 2, 1001 * 10100 = 10110100. In base 10, 1001 * 10100 = 10110100. These digits match and therefore the pairs T(9, 20) and T(20, 9) are a 1 in the sequence (at a(444) and a(455)).
In base 2, the product of 11 * 11 = 1001, whereas 11 * 11 in base 10 yields 121. T(3, 3) is the 24th pair in the sequence and the first to fail. a(24) is thus a 0.
The array begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 0, 1, 1, 0, 0, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 0, 1, 0, 1, ...
1, 1, 1, 0, 1, 1, 0, 0, 1, ...
1, 1, 1, 0, 1, 0, 0, 0, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
PROG
(Python)
def a322674(k):
seq = []
i = 0
while len(seq) <= k:
j = 0
while len(seq) <= k and j < i + 1:
n = i - j
m = j
decn = int(bin(n).replace('0b', ''))
decm = int(bin(m).replace('0b', ''))
binProd = bin(n * m).replace('0b', '')
decProd = str(decn * decm)
seq.append(int(binProd == decProd))
j += 1
i += 1
print(seq)
a322674(100)
(PARI) T(n, k) = fromdigits(binary(n))*fromdigits(binary(k)) == fromdigits(binary(n*k)); \\ Michel Marcus, Apr 03 2019
CROSSREFS
KEYWORD
nonn,easy,base,tabl
AUTHOR
Jan Koornstra, Jan 22 2019
STATUS
approved

Search completed in 0.007 seconds