cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A036556 Integers which when multiplied by 3 have an odd number of 1's in their binary expansion (cf. A000069).

Original entry on oeis.org

7, 14, 23, 27, 28, 29, 31, 39, 46, 54, 56, 57, 58, 62, 71, 78, 87, 91, 92, 93, 95, 103, 107, 108, 109, 111, 112, 113, 114, 115, 116, 117, 119, 123, 124, 125, 127, 135, 142, 151, 155, 156, 157, 159, 167, 174, 182, 184, 185, 186, 190, 199, 206, 214
Offset: 1

Views

Author

Keywords

Comments

In other words, numbers n such that 3n is odious.
Numbers n such that valuation(binomial(3n,n),2) is odd. - Benoit Cloitre, Jun 06 2004
Intersection of A000069 and A008585 (multiples of 3), divided by 3.

Crossrefs

Programs

  • Magma
    [ n : n in [0..150] | IsOdd(&+Intseq(3*n, 2))]; // Vincenzo Librandi, Apr 13 2011
  • Mathematica
    Select[ Range[ 214 ], OddQ[ Plus@@IntegerDigits[ 3#, 2 ]]& ]
  • PARI
    for(n=1,214,if(valuation(binomial(3*n,n),2)%2==1,print1(n,","))) \\ Benoit Cloitre, Jun 06 2004
    

Formula

a(n) = A180963(n)/3. - Amiram Eldar, Aug 06 2023

Extensions

Definition corrected by N. J. A. Sloane, Jan 09 2007

A224072 Odd odious numbers divisible by 3.

Original entry on oeis.org

21, 69, 81, 87, 93, 117, 171, 213, 261, 273, 279, 285, 309, 321, 327, 333, 339, 345, 351, 357, 369, 375, 381, 405, 453, 465, 471, 477, 501, 555, 597, 651, 675, 681, 687, 699, 747, 789, 837, 849, 855, 861, 885, 939, 981, 1029, 1041, 1047, 1053, 1077, 1089, 1095
Offset: 1

Views

Author

Vladimir Shevelev, Mar 30 2013

Keywords

Comments

By Moser-Newman phenomenon among the first N positive integers multiple of 3, the evil numbers are always in the majority. Moreover, this excess tends to infinity as N goes to infinity and its growth is of order N^a, where a = log(3)/log(4).

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 2000, 6], OddQ[DigitCount[#, 2]][[1]] &] (* Peter J. C. Moses, Apr 04 2013 *)
  • PARI
    isok(m) = (m % 2) && !(m % 3) && (hammingweight(m) % 2); \\ Michel Marcus, Feb 20 2021

A360799 Numbers m with m mod 3 = q, q != 2, such that the number of ones in its base-2 representation is even if q=0 and odd if q=1.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 12, 13, 15, 16, 18, 19, 22, 24, 25, 27, 28, 30, 31, 33, 36, 37, 39, 45, 48, 49, 51, 52, 54, 55, 57, 60, 61, 63, 64, 66, 67, 70, 72, 73, 75, 76, 78, 79, 82, 88, 90, 91, 94, 96, 97, 99, 100, 102, 103, 105, 108, 109, 111, 112, 114, 115, 118, 120, 121
Offset: 0

Views

Author

Gerhard Kirchner, Feb 24 2023

Keywords

Comments

For q=0, the terms in A180963 are excluded.
The terms of the sequence occur, with some exceptions, while tiling a wall (odd width w) with 1 X 2 dominos. The current tiling status can be described by a number x with 0 <= x < 2^w. In the base-2 representation, 1 stands for an overstanding unit square, see example.
Statement:
The tiling always starts with q=1 and an odd number of ones (type 1) and is followed by a term with q=0 and an even number of ones (type 2) and so on, alternately.
Proof:
Start, provisionally, with w upright dominos. The corresponding term is x = (11..1) = 2^w-1 with x mod 3 = 1 (type 1). Another first profile can be generated by replacing a pair of adjacent upright dominos with one flat domino. In the base-2 representation, this is the subtraction (11..11..1) - (00..11..0) = (11..00..1). The subtrahend is 3*2^j with 0 <= j < w. Therefore, the modified term also is type 1. This way, any first profile can be found and it is type 1.
In the next provisional step, an upright domino is placed on each not overstanding unit square. If p1 is the first profile, then the second is p2 = 2^w - 1 - p1 with p2 mod 3 = 0. Moreover, the transition from p1 to p2 exchanges the ones and zeros such that p2 is type 2. Again, replacing adjacent upright dominos by one flat domino does not change the type of the profile. The next profile is type 1 and so on. QED. Condition to be satisfied by a tiling profile: The continued removal of 00 and 11 (reduction) leads to (0) or (1). Example: a(10)=18=(10010) -> (110) -> (0). The first exceptions are a(314) = 682 = (01010101010), a(611) = 1365 = (10101010101) and a(988) = 2218 = (0100010101010). Note that the reduction of 2218 is 682.

Examples

			 5 X 4 wall is tiled bottom-up with 1 X 2 dominos:
                                      _    ___ ___ _
                 _ _          _ _ ___| |  |_ _|___| |
        _       | | |_ ___   | | |_ _|_|  | | |_ _|_|
    ___| |___   |_|_| |___|  |_|_| |___|  |_|_| |___|
   |___|_|___|  |___|_|___|  |___|_|___|  |___|_|___|
    0 0 1 0 0    1 1 0 0 0    0 0 0 0 1    0 0 0 0 0
     4 = a(3)   24 = a(14)     1 = a(1)     0 = a(0)
		

Crossrefs

Programs

  • Maxima
    block(kmax: 100, a:[],
     even_ones(x):= block(su:0,
      while x>0 do(p: mod(x,2), x:(x-p)/2, su:su+p),
       return(mod(su,2))),
    for k from 0 thru kmax do(r:mod(k,3),
     if r<2 and r=even_ones(k) then a:append(a,[k])),a);
    
  • PARI
    isok(m) = my(k=m%3); if (hammingweight(m) % 2, k==1, k==0); \\ Michel Marcus, Feb 27 2023

A360800 Numbers Sum_{i=1..2r+1} 2^k(i) such that k(1) is even and, for r > 0 and i < 2r+1, the difference k(i+1)-k(i) is > 0 and odd.

Original entry on oeis.org

1, 4, 7, 16, 19, 25, 28, 31, 64, 67, 73, 76, 79, 97, 100, 103, 112, 115, 121, 124, 127, 256, 259, 265, 268, 271, 289, 292, 295, 304, 307, 313, 316, 319, 385, 388, 391, 400, 403, 409, 412, 415, 448, 451, 457, 460, 463, 481, 484, 487, 496, 499, 505, 508, 511, 1024
Offset: 1

Views

Author

Gerhard Kirchner, Feb 24 2023

Keywords

Comments

This is a subsequence of A360799. Another description of the terms: in the base-2 representation, the number of ones is odd and all zeros are grouped in blocks of even length.
That is why the terms less than 2^(2j+1) describe start profiles for tiling a (2j+1) X m wall with 1 X 2 dominos, see examples and A360799.

Examples

			A 5 X m wall is tiled bottom-up with dominos, start profiles:
            _        _            _ _ _    _     _ _    _ _ _ _ _
    ___ ___| |   ___| |___    ___| | | |  | |___| | |  | | | | | |
   |___|___|_|  |___|_|___|  |___|_|_|_|  |_|___|_|_|  |_|_|_|_|_|
    0 0 0 0 1    0 0 1 0 0    0 0 1 1 1    1 0 0 1 1    1 1 1 1 1
    1 = a(1)     4 = a(2)     7 = a(3)     19 = a(5)    31 = a(7)
    also the mirror images of 1 (16), 19 (25) and 7 (28).
		

Crossrefs

Programs

  • Maxima
    block(kmax: 100, a:[],
     oddsum(y):= block(su1:0, su2:0, pold:0, ok: true,
      while y>0 and ok do(p:mod(y,2), y:(y-p)/2,
       if p=1 then(if pold=0 and su2=1 then ok:false, su1:1-su1, su2:0)
       elseif p=0 then su2:1-su2, pold:p), return(is(ok and su1=1))),
    for k from 1 thru kmax do if oddsum(k) then a:append(a,[k]),a);
Showing 1-4 of 4 results.