login
Search: a115845 -id:a115845
     Sort: relevance | references | number | modified | created      Format: long | short | data
Sequence A115845 in binary.
+20
1
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1010, 1100, 1110, 10000, 10001, 10100, 10101, 11000, 11100, 100000, 100001, 100010, 100011, 101000, 101010, 110000, 110001, 111000, 1000000, 1000001, 1000010, 1000011, 1000100, 1000101
OFFSET
0,3
CROSSREFS
Cf. a(n) = A007088(A115845(n)).
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 01 2006
STATUS
approved
Numbers n such that binary expansion matches ((0)*00(1?)1)*(0*).
+10
13
0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 17, 18, 19, 24, 25, 32, 33, 34, 35, 36, 38, 48, 49, 50, 51, 64, 65, 66, 67, 68, 70, 72, 73, 76, 96, 97, 98, 99, 100, 102, 128, 129, 130, 131, 132, 134, 136, 137, 140, 144, 145, 146, 147, 152, 153, 192, 193, 194, 195, 196, 198, 200, 201
OFFSET
1,3
COMMENTS
If bit i is 1, then bits i+-2 must be 0. All terms satisfy A048725(n) = 5*n.
It appears that n is in the sequence if and only if C(5n,n) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
Yes, as remarked in A048715, "This is easily proved using the well-known result that the multiplicity with which a prime p divides C(n+m,n) is the number of carries when adding n+m in base p." - Jason Kimberley, Dec 21 2011
A116361(a(n)) <= 2. - Reinhard Zumkeller, Feb 04 2006
MATHEMATICA
Reap[Do[If[OddQ[Binomial[5n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
(* Second program: *)
filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, MatchQ[bb, {0}|{1}|{1, 1}|{___, 0, _, 1, ___}|{___ 1, _, 0, ___}] && !MatchQ[bb, {___, 1, _, 1, ___}]];
Select[Range[0, 201], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
PROG
(PARI) is(n)=!bitand(n, n>>2) \\ Charles R Greathouse IV, Oct 03 2016
(PARI) list(lim)=my(v=List(), n, t); while(n<=lim, t=bitand(n, n>>2); if(t, n+=1<<valuation(t, 2), listput(v, n); n++)); Vec(v) \\ Charles R Greathouse IV, Oct 22 2021
CROSSREFS
Superset of A048715 and A048719. Union of A004742 and A003726.
KEYWORD
nonn,base,easy
AUTHOR
Antti Karttunen, Mar 30 1999
STATUS
approved
Differences between the ordinary multiplication table A004247 and the carryless multiplication table for GF(2)[X] polynomials A048720, i.e., the effect of the carry bits in binary multiplication.
+10
12
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 12, 0, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0
OFFSET
0,25
FORMULA
a(n) = A004247(n) - A048720(n).
EXAMPLE
From Peter Munn, Jan 28 2021: (Start)
The top left 12 X 12 corner of the table:
| 0 1 2 3 4 5 6 7 8 9 10 11
------+------------------------------------------------
0 | 0 0 0 0 0 0 0 0 0 0 0 0
1 | 0 0 0 0 0 0 0 0 0 0 0 0
2 | 0 0 0 0 0 0 0 0 0 0 0 0
3 | 0 0 0 4 0 0 8 12 0 0 0 4
4 | 0 0 0 0 0 0 0 0 0 0 0 0
5 | 0 0 0 0 0 8 0 8 0 0 16 16
6 | 0 0 0 8 0 0 16 24 0 0 0 8
7 | 0 0 0 12 0 8 24 28 0 0 16 28
8 | 0 0 0 0 0 0 0 0 0 0 0 0
9 | 0 0 0 0 0 0 0 0 0 16 0 16
10 | 0 0 0 0 0 16 0 16 0 0 32 32
11 | 0 0 0 4 0 16 8 28 0 16 32 52
(End)
CROSSREFS
"Zoomed in" variant: A061859.
Rows/columns 3, 5 and 7 are given by A048728, A048729, A048730.
Main diagonal divided by 4: A213673.
Numbers that generate no carries when multiplied in binary by 11_2: A003714, by 101_2: A048716, by 1001_2: A115845, by 10001_2: A115847, by 100001_2: A114086.
Other sequences related to the presence/absence of a carry in binary multiplication: A116361, A235034, A235040, A236378, A266195, A289726.
KEYWORD
nonn,tabl,easy
AUTHOR
Antti Karttunen, May 11 2001
STATUS
approved
Smallest k such that n XOR n*2^k = n*(2^k + 1).
+10
9
0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 4, 2, 4, 3, 4, 1, 1, 1, 2, 1, 1, 4, 5, 2, 2, 4, 5, 3, 5, 4, 5, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 6, 4, 4, 5, 6, 2, 2, 2, 2, 4, 6, 5, 6, 3, 6, 5, 6, 4, 6, 5, 6, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 4, 2, 5, 6, 7, 1, 1, 1, 7, 1, 1, 6, 7, 4, 5, 4, 7, 5, 5, 6, 7, 2, 2, 2, 2, 2, 7, 2, 7, 4
OFFSET
0,4
COMMENTS
a(A003714(n)) <= 1;
a(A048716(n)) <= 2;
a(A115845(n)) <= 3;
a(A115847(n)) <= 4;
a(A114086(n)) <= 5;
a(A116362(n)) = n and a(m) < n for m < A116362(n).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
MATHEMATICA
a[n_] := Module[{k}, For[k = 0, True, k++,
If[BitXor[n, n*2^k] == n*(2^k+1), Return[k]]]];
Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 19 2021 *)
PROG
(PARI) a(n)=my(k); while(bitxor(n, n<<k)-n!=n<<k, k++); k \\ Charles R Greathouse IV, Mar 07 2013
(Python)
from itertools import count
def A116361(n): return next(k for k in count(0) if n^(m:=n<<k)==m+n) # Chai Wah Wu, Jul 19 2024
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Feb 04 2006
EXTENSIONS
Offset corrected by Charles R Greathouse IV, Mar 07 2013
STATUS
approved
Integers i such that 17*i = 17 X i, i.e., 16*i XOR i = 17*i.
+10
8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 36, 37, 40, 41, 44, 45, 48, 52, 56, 60, 64, 65, 66, 67, 72, 73, 74, 75, 80, 82, 88, 90, 96, 97, 104, 105, 112, 120, 128, 129, 130, 131, 132, 133, 134, 135, 144, 146, 148, 150
OFFSET
0,3
COMMENTS
Here * stands for ordinary multiplication and X means carryless (GF(2)[X]) multiplication (A048720).
A116361(a(n)) <= 4. - Reinhard Zumkeller, Feb 04 2006
PROG
(PARI) is(n)=bitxor(n, 16*n)==17*n \\ Charles R Greathouse IV, Dec 08 2013
CROSSREFS
Cf. A115848 shows this sequence in binary. Complement of A115849. Differs from A032966 for the first time at n=25, where A032966(25)=34 while a(25)=33.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 01 2006
STATUS
approved
Numbers m such that m XOR 32*m = 33*m.
+10
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 65, 68, 69, 72, 73, 76, 77, 80, 81, 84, 85, 88, 89, 92, 93, 96, 100, 104, 108, 112, 116, 120
OFFSET
0,3
COMMENTS
A116361(a(n)) <= 5.
PROG
(PARI) is(n)=bitxor(n, 32*n)==33*n \\ Charles R Greathouse IV, Sep 25 2024
CROSSREFS
Differs from A001477 for the first time at n=33 (33, 35, 37, 39, etc. are not present in this sequence). Cf. A003714, A048716, A115845, A115847.
KEYWORD
nonn,changed
AUTHOR
Reinhard Zumkeller, Feb 04 2006
STATUS
approved

Search completed in 0.006 seconds