[go: up one dir, main page]

login
Search: a080719 -id:a080719
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n such that A080719(n) divides n.
+20
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 20, 30, 40, 50, 60, 70, 80, 90, 100, 105, 112, 120, 200, 210, 220, 240, 300, 330, 342, 360, 400, 408, 453, 462, 500, 504, 573, 600, 700, 720, 800, 900, 924, 1000, 1008, 1010, 1012, 1020, 1040, 1050, 1116, 1120, 1145, 1200, 1320, 1750, 1900, 2000
OFFSET
1,2
EXAMPLE
Let us consider n = 342: 3 converted to base 2 is 11, 4 is 100, 2 is 10. Their concatenation is 1110010 that converted to base 10 is 114. So A080719(342) = 114. Finally 114 divides 342, so 342 is a member.
MAPLE
P:=proc(q) local a, b, k, n, x; for n from 1 to q do x:=[]; a:=n;
for k from 1 to length(n) do b:=convert((a mod 10), base, 2);
if b=[] then x:=[op(x), 0]; else x:=[op(x), op(b)]; fi; a:=trunc(a/10); od; a:=0;
for k from 1 to nops(x) do a:=2*a+x[-k]; od; if frac(n/a)=0 then print(n);
fi; od; end: P(2000);
MATHEMATICA
Select[Range[2000], Divisible[#, FromDigits[Flatten[IntegerDigits[#, 2]&/@ IntegerDigits[ #]], 2]]&] (* Harvey P. Dale, Mar 13 2019 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 05 2015
EXTENSIONS
Corrected and extended by Harvey P. Dale, Mar 13 2019
Corrected Maple code by Paolo P. Lava, Apr 01 2019
STATUS
approved
In decimal representation of n: replace each digit with its binary representation.
+10
3
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 10, 11, 110, 111, 1100, 1101, 1110, 1111, 11000, 11001, 100, 101, 1010, 1011, 10100, 10101, 10110, 10111, 101000, 101001, 110, 111, 1110, 1111, 11100, 11101, 11110, 11111, 111000, 111001, 1000, 1001, 10010, 10011
OFFSET
0,3
COMMENTS
a(n) = n iff (largest digit of n) = 1: a(A007088(n)) = A007088(n);
a(n) = A007088(A080719(n)).
LINKS
EXAMPLE
. n | dec --> bin | a(n) | A080719(n)
. -----+--------------------------+----------+------------
. 100 | [1,0,0] | [1,0,0] | 100 | 4
. 101 | [1,0,1] | [1,0,1] | 101 | 5
. 102 | [1,0,2] | [1,0,10] | 1010 | 10
. 103 | [1,0,3] | [1,0,11] | 1011 | 11
. 104 | [1,0,4] | [1,0,100] | 10100 | 20
. 105 | [1,0,5] | [1,0,101] | 10101 | 21
. 106 | [1,0,6] | [1,0,110] | 10110 | 22
. 107 | [1,0,7] | [1,0,111] | 10111 | 23
. 108 | [1,0,8] | [1,0,1000] | 101000 | 40
. 109 | [1,0,9] | [1,0,1001] | 101001 | 41
. 110 | [1,1,0] | [1,1,0] | 110 | 6
. 111 | [1,1,1] | [1,1,1] | 111 | 7
. 112 | [1,1,2] | [1,1,10] | 1110 | 14
. 113 | [1,1,3] | [1,1,11] | 1111 | 15
. 114 | [1,1,4] | [1,1,100] | 11100 | 28
. 115 | [1,1,5] | [1,1,101] | 11101 | 29
. 116 | [1,1,6] | [1,1,110] | 11110 | 30
. 117 | [1,1,7] | [1,1,111] | 11111 | 31
. 118 | [1,1,8] | [1,1,1000] | 111000 | 56
. 119 | [1,1,9] | [1,1,1001] | 111001 | 57
. 120 | [1,2,0] | [1,10,0] | 1100 | 12
. 121 | [1,2,1] | [1,10,1] | 1101 | 13
. 122 | [1,2,2] | [1,10,10] | 11010 | 26
. 123 | [1,2,3] | [1,10,11] | 11011 | 27
. 124 | [1,2,4] | [1,10,100] | 110100 | 52
. 125 | [1,2,5] | [1,10,101] | 110101 | 53 .
MATHEMATICA
Table[FromDigits[Flatten[IntegerDigits[#, 2]&/@IntegerDigits[n]]], {n, 0, 50}] (* Harvey P. Dale, Jun 06 2020 *)
PROG
(Haskell)
import Data.Maybe (mapMaybe)
a257831 = foldr (\b v -> 10 * v + b) 0 .
concat . mapMaybe (flip lookup bin) . a031298_row
where bin = zip [0..9] a030308_tabf
(Python)
def A257831(n):
....return int(''.join((format(int(d), 'b') for d in str(n))))
# Chai Wah Wu, May 10 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
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.005 seconds