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.

Previous Showing 31-37 of 37 results.

A360981 a(n) is the least positive multiple of n that is an evil number (A001969).

Original entry on oeis.org

3, 6, 3, 12, 5, 6, 63, 24, 9, 10, 33, 12, 39, 126, 15, 48, 17, 18, 57, 20, 63, 66, 23, 24, 75, 78, 27, 252, 29, 30, 1023, 96, 33, 34, 105, 36, 111, 114, 39, 40, 123, 126, 43, 132, 45, 46, 141, 48, 147, 150, 51, 156, 53, 54, 165, 504, 57, 58, 177, 60, 183, 2046
Offset: 1

Views

Author

Rémy Sigrist, Feb 27 2023

Keywords

Comments

This sequence is well defined: for any n > 0, A020330(n) is both a multiple of n and an evil number.

Crossrefs

Cf. A001969, A020330, A180938, A360980 (variant for odious numbers).

Programs

  • Maple
    f:= proc(n) local k;
      for k from n by n do
        if convert(convert(k,base,2),`+`)::even then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 29 2023
  • Mathematica
    a[n_] := Module[{k = n}, While[OddQ[DigitCount[k, 2, 1]], k +=n]; k]; Array[a, 100] (* Amiram Eldar, Aug 07 2023 *)
  • PARI
    a(n) = { forstep (m=n, oo, n, if (hammingweight(m)%2==0, return (m))) }
    
  • Python
    def A360981(n):
        k = n
        while k.bit_count()&1:
            k += n
        return k # Chai Wah Wu, Feb 28 2023

Formula

a(n) = A180938(n) * n.
a(n) = n iff n belongs to A001969.

A092739 Numbers n such that n*(n+1)/2 is the juxtaposition of two identical strings in binary representation.

Original entry on oeis.org

2, 4, 5, 8, 9, 16, 17, 32, 33, 44, 64, 65, 90, 128, 129, 171, 256, 257, 512, 513, 702, 1024, 1025, 2048, 2049, 2732, 4096, 4097, 5542, 8192, 8193, 10923, 16384, 16385, 17515, 22939, 32768, 32769, 40050, 43361, 65536, 65537, 131072, 131073, 174764
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 12 2004

Keywords

Comments

2^n are terms for n>0 (A000079), 2^n + 1 are terms for n>1 (A000051).

Examples

			17*(17+1)/2= 153 = 9*2^4 + 9 -> '10011001' -> '1001''1001', therefore 17 is a term.
		

Crossrefs

Programs

  • Mathematica
    tisbQ[n_]:=Module[{idn=IntegerDigits[(n(n+1))/2,2],len},len=Length[idn];EvenQ[ len]&&Take[idn,len/2]==Take[idn,-len/2]]; Select[Range[ 180000], tisbQ] (* Harvey P. Dale, Aug 08 2016 *)
  • PARI
    is(n)=my(L=#binary(n*=(n+1)/2)\2); n>>L==bitand(n,2^L-1) \\ Charles R Greathouse IV, Mar 29 2013

A342378 List of numbers whose binary expansion is an instance of the Zimin pattern ABA.

Original entry on oeis.org

5, 7, 9, 11, 13, 15, 17, 18, 19, 21, 22, 23, 25, 27, 29, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 99, 101
Offset: 1

Views

Author

Peter Kagey, Mar 09 2021

Keywords

Comments

This is A091066 with some terms of A020330 removed.

Examples

			The binary expansion of 182 is 10110110, which is an instance of the pattern ABA with A=10 and B=1101.
		

Crossrefs

Programs

  • Python
    def ok(n):
      b = bin(n)[2:]
      for i in range(1, (len(b)+1)//2):
        if b[:i] == b[-i:]: return True
      return False
    def aupto(lim): return [m for m in range(lim+1) if ok(m)]
    print(aupto(101)) # Michael S. Branicky, Mar 09 2021

A361399 a(n) is the least k such that the binary expansion of n is a self-infiltration of that of k.

Original entry on oeis.org

0, 1, 2, 1, 2, 5, 2, 3, 4, 5, 2, 5, 2, 5, 6, 3, 4, 9, 10, 5, 4, 5, 10, 11, 4, 5, 6, 5, 6, 13, 6, 7, 8, 9, 18, 9, 4, 9, 10, 11, 4, 9, 10, 5, 10, 5, 22, 11, 4, 9, 10, 5, 10, 5, 6, 11, 12, 13, 6, 13, 6, 13, 14, 7, 8, 17, 18, 9, 18, 9, 18, 19, 8, 9, 10, 19, 10, 21
Offset: 0

Views

Author

Rémy Sigrist, Mar 10 2023

Keywords

Comments

See A361398 for the definition of an infiltration (a self-infiltration is an infiltration a of word with itself).
a(n) is the index of the first row of A361401 containing n.

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) <= n.
a(A020330(n)) = n.

A361943 a(n) is the least multiple of n whose binary expansion is an abelian square (A272653).

Original entry on oeis.org

3, 10, 3, 36, 10, 36, 63, 136, 9, 10, 33, 36, 130, 154, 15, 528, 34, 36, 190, 520, 63, 132, 46, 528, 150, 130, 54, 588, 725, 150, 1023, 2080, 33, 34, 630, 36, 222, 190, 156, 520, 615, 588, 43, 132, 45, 46, 235, 528, 147, 150, 51, 156, 53, 54, 165, 2296, 513
Offset: 1

Views

Author

Rémy Sigrist, Mar 31 2023

Keywords

Comments

This sequence is well defined as for any n > 0, A020330(n) is a multiple of n and its binary expansion is an abelian square.

Examples

			The first terms, alongside their binary expansion, are:
  n   a(n)  bin(a(n))
  --  ----  ----------
   1     3          11
   2    10        1010
   3     3          11
   4    36      100100
   5    10        1010
   6    36      100100
   7    63      111111
   8   136    10001000
   9     9        1001
  10    10        1010
  11    33      100001
  12    36      100100
  13   130    10000010
  14   154    10011010
  15    15        1111
  16   528  1000010000
		

Crossrefs

Programs

  • PARI
    a(n) = { forstep (m = n, oo, n, my (w = #binary(m)); if (w%2==0 && hammingweight(m)==2*hammingweight(m % (2^(w/2))), return (m))) }
    
  • Python
    from itertools import count
    def a(n): return next(m for m in count(n, n) if not (w:=m.bit_length())&1 and m.bit_count() == ((m>>(w>>1)).bit_count())<<1)
    print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Mar 31 2023 after Rémy Sigrist

Formula

a(n) = A361944(n) * n.
a(n) <= A020330(n).
a(n) >= n with equality iff n belongs to A272653.

A298306 The Frobenius number of the set of binary n-th powers, divided out by its GCD.

Original entry on oeis.org

17, 723, 52753, 49790415, 126629
Offset: 2

Views

Author

Jeffrey Shallit, Jan 16 2018

Keywords

Comments

The binary n-th powers are those positive integers whose base-2 representation consists of n consecutive identical blocks. For example, the binary squares 3, 10, 15, ... form sequence A020330. The GCD of the binary n-th powers form sequence A014491. The Frobenius number of a set S with GCD 1 is the largest number not representable as an N-linear combination of members of S.

Examples

			For n = 2 the first few binary squares are 3, 10, 15, 36, ... with GCD 1 and the Frobenius number of (3, 10, 15, 36) is 17.
		

Crossrefs

A322261 Square array T(n, k) (n >= 0, k >= 0) read by antidiagonals upwards: the lengths of runs in binary expansion of T(n, k) correspond to the lengths of runs in binary expansion of n followed by the lengths of runs in binary expansion of k.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 5, 5, 3, 4, 6, 10, 4, 4, 5, 9, 13, 11, 11, 5, 6, 10, 18, 12, 20, 10, 6, 7, 13, 21, 19, 27, 21, 9, 7, 8, 14, 26, 20, 36, 26, 22, 8, 8, 9, 17, 29, 27, 43, 37, 25, 23, 23, 9, 10, 18, 34, 28, 52, 42, 38, 24, 40, 22, 10, 11, 21, 37, 35, 59, 53
Offset: 0

Views

Author

Rémy Sigrist, Dec 01 2018

Keywords

Comments

The array T is associative.

Examples

			Array T(n, k) begins (in decimal):
  n\k|  0   1   2   3   4   5   6   7    8    9   10   11   12
  ---+--------------------------------------------------------
    0|  0   1   2   3   4   5   6   7    8    9   10   11   12
    1|  1   2   5   4  11  10   9   8   23   22   21   20   19
    2|  2   5  10  11  20  21  22  23   40   41   42   43   44
    3|  3   6  13  12  27  26  25  24   55   54   53   52   51
    4|  4   9  18  19  36  37  38  39   72   73   74   75   76
    5|  5  10  21  20  43  42  41  40   87   86   85   84   83
    6|  6  13  26  27  52  53  54  55  104  105  106  107  108
    7|  7  14  29  28  59  58  57  56  119  118  117  116  115
    8|  8  17  34  35  68  69  70  71  136  137  138  139  140
Array T(n, k) begins (in binary):
  n\k |     0      1      10      11      100      101      110      111      1000
  ----+---------------------------------------------------------------------------
     0|     0      1      10      11      100      101      110      111      1000
     1|     1     10     101     100     1011     1010     1001     1000     10111
    10|    10    101    1010    1011    10100    10101    10110    10111    101000
    11|    11    110    1101    1100    11011    11010    11001    11000    110111
   100|   100   1001   10010   10011   100100   100101   100110   100111   1001000
   101|   101   1010   10101   10100   101011   101010   101001   101000   1010111
   110|   110   1101   11010   11011   110100   110101   110110   110111   1101000
   111|   111   1110   11101   11100   111011   111010   111001   111000   1110111
  1000|  1000  10001  100010  100011  1000100  1000101  1000110  1000111  10001000
		

Crossrefs

Programs

  • PARI
    torl(n) = my (r=[]); while (n, r = concat(valuation(n+(n%2),2), r); n \= 2^r[1];); r
    fromrl(r) = my (v=0); for (i=1, #r, v = (v + (i%2))*2^r[i]-(i%2)); v
    T(n,k) = fromrl(concat(torl(n), torl(k)))

Formula

T(n, 0) = T(0, n) = n.
T(n, 1) = A042963(n+1).
T(n, 2) = A047617(n+1).
T(n, 3) = A047457(n+1).
T(1, n) = A010078(n+1).
T(2, n) = A004757(n) for any n > 0.
A005811(T(n, k)) = A005811(n) + A005811(k).
T(2*n, k) = A163621(2*n, k) for any n > 0 and k > 0.
T(2*n, 2*n) = A020330(2*n) for any n > 0.
Previous Showing 31-37 of 37 results.