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-6 of 6 results.

A114396 Distinct values in A115873, in order of appearance.

Original entry on oeis.org

1, 3, 7, 15, 5, 31, 63, 21, 9, 127, 51, 255, 219, 119, 85, 83, 17, 511, 101, 231, 87, 73, 215, 1023, 455, 879, 495, 341, 41, 765, 179, 403, 33, 2047, 1911, 233, 819, 195, 109, 1755, 949, 959, 237, 975, 1325, 755, 583, 1533, 91, 815, 4095, 3703, 1935, 2015
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2006

Keywords

Crossrefs

a(n) = A115873(A114395(n)). Same sequence in binary: A114397.

A114395 Positions where A115873 takes for the first time a value distinct from any of its earlier values.

Original entry on oeis.org

1, 3, 5, 9, 13, 17, 33, 49, 57, 65, 81, 129, 169, 181, 193, 203, 241, 257, 333, 357, 405, 449, 471, 513, 577, 681, 745, 769, 809, 921, 923, 977, 993, 1025, 1201, 1209, 1281, 1345, 1357, 1401, 1457, 1461, 1465, 1481, 1633, 1659, 1811, 1817, 1899, 1967
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2006

Keywords

Crossrefs

A114396 gives the corresponding values.

A115872 Square array where row n gives all solutions k > 0 to the cross-domain congruence n*k = A048720(A065621(n),k), zero sequence (A000004) if no such solutions exist.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 4, 3, 6, 1, 5, 4, 7, 2, 7, 6, 5, 12, 3, 14, 3, 7, 6, 14, 4, 15, 6, 7, 8, 7, 15, 5, 28, 7, 14, 1, 9, 8, 24, 6, 30, 12, 15, 2, 15, 10, 9, 28, 7, 31, 14, 28, 3, 30, 7, 11, 10, 30, 8, 56, 15, 30, 4, 31, 14, 3, 12, 11, 31, 9, 60, 24, 31, 5, 60, 15, 6, 3, 13, 12, 48, 10, 62, 28, 56, 6, 62, 28, 12, 6, 5, 14, 13, 51, 11, 63, 30, 60, 7, 63, 30, 15, 7, 10, 7
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2006

Keywords

Comments

Here * stands for ordinary multiplication and X means carryless (GF(2)[X]) multiplication (A048720).
Square array is read by descending antidiagonals, as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Rows at positions 2^k are 1, 2, 3, ..., (A000027). Row 2n is equal to row n.
Numbers on each row give a subset of positions of zeros at the corresponding row of A284270. - Antti Karttunen, May 08 2019

Examples

			Fifteen initial terms of rows 1 - 19 are listed below:
   1:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   2:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   3:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
   4:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   5:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
   6:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
   7:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
   8:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   9: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  10:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
  11:  3,  6, 12,  15,  24,  27,  30,  31,  48,  51,  54,  60,  62,  63,  96, ...
  12:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
  13:  5, 10, 15,  20,  21,  30,  31,  40,  42,  45,  47,  60,  61,  62,  63, ...
  14:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
  15: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  16:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
  17: 31, 62, 63, 124, 126, 127, 248, 252, 254, 255, 496, 504, 508, 510, 511, ...
  18: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  19:  7, 14, 28,  31,  56,  62,  63, 112, 119, 124, 126, 127, 224, 238, 248, ...
		

Crossrefs

Transpose: A114388. First column: A115873.
Cf. also arrays A277320, A277810, A277820, A284270.
A few odd-positioned rows: row 1: A000027, Row 3: A048717, Row 5: A115770 (? Checked for all values less than 2^20), Row 7: A115770, Row 9: A115801, Row 11: A115803, Row 13: A115772, Row 15: A115801 (? Checked for all values less than 2^20), Row 17: A115809, Row 19: A115874, Row 49: A114384, Row 57: A114386.

Programs

  • Mathematica
    X[a_, b_] := Module[{A, B, C, x},
         A = Reverse@IntegerDigits[a, 2];
         B = Reverse@IntegerDigits[b, 2];
         C = Expand[
            Sum[A[[i]]*x^(i-1), {i, 1, Length[A]}]*
            Sum[B[[i]]*x^(i-1), {i, 1, Length[B]}]];
         PolynomialMod[C, 2] /. x -> 2];
    T[n_, k_] := Module[{x = BitXor[n-1, 2n-1], k0 = k},
         For[i = 1, True, i++, If[n*i == X[x, i],
         If[k0 == 1, Return[i], k0--]]]];
    Table[T[n-k+1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 04 2022 *)
  • PARI
    up_to = 120;
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    A115872sq(n, k) = { my(x = A065621(n)); for(i=1,oo,if((n*i)==A048720(x,i),if(1==k,return(i),k--))); };
    A115872list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A115872sq(col,(a-(col-1))))); (v); };
    v115872 = A115872list(up_to);
    A115872(n) = v115872[n]; \\ (Slow) - Antti Karttunen, May 08 2019

Extensions

Example section added and the data section extended up to n=105 by Antti Karttunen, May 08 2019

A292849 a(n) is the least positive k such that the Hamming weight of k equals the Hamming weight of k*n.

Original entry on oeis.org

1, 1, 3, 1, 7, 3, 7, 1, 15, 7, 3, 3, 5, 7, 15, 1, 31, 15, 7, 7, 13, 3, 7, 3, 31, 5, 31, 7, 31, 15, 31, 1, 63, 31, 11, 15, 7, 7, 7, 7, 57, 13, 3, 3, 23, 7, 11, 3, 21, 31, 43, 5, 39, 31, 7, 7, 9, 31, 35, 15, 21, 31, 63, 1, 127, 63, 23, 31, 15, 11, 15, 15, 29, 7
Offset: 1

Views

Author

Rémy Sigrist and Altug Alkan, Sep 25 2017

Keywords

Comments

The Hamming weight of a number n is given by A000120(n).
All terms are odd.
Numbers n such that a(n) is not squarefree are 33, 57, 63, 66, 83, 114, 115, 126, 132, 153, 155, ...
Numbers n such that a(n) > n are 5, 9, 17, 25, 27, 29, 33, 41, 65, 97, 101, 109, 113, ...
a(n) = 1 iff n = 2^i for some i >= 0.
a(n) = 3 iff n = A007583(i) * 2^j for some i > 0 and j >= 0.
Apparently:
- if n < 2^k then a(n) < 2^k,
- a(n) = n iff n = A000225(i) for some i > 0.
Proof that a(n) < 2^k if n < 2^k (see preceding comment): We can assume that n is not a power of two and take k such that 2^(k-1) < n < 2^k (so that k is the number of binary digits of n). Now, n - 1 and 2^k - n have complementary binary digits, so the binary digits of (2^k - 1)*n = 2^k*(n - 1) + (2^k - n) consist of the k digits of n - 1 followed by the complementary digits. This implies that the number of binary 1's is k, so that (2^k - 1)*n and 2^k - 1 have the same number of 1's and a(n) <= 2^k - 1. - Pontus von Brömssen, Jan 01 2021
See also A180012 for the base 10 equivalent sequence.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[1, 2^8 + 1, 2], Equal @@ Thread[DigitCount[{#, # n}, 2, 1]] &], {n, 74}] (* Michael De Vlieger, Sep 25 2017 *)
  • PARI
    a(n) = forstep(k=1, oo, 2, if (hammingweight(k) == hammingweight(k*n), return (k)))
    
  • PARI
    a(n) = my(k=1); while ((hammingweight(k)) != hammingweight(k*n), k++); k;
    
  • Python
    from itertools import count
    def A292849(n): return next(k for k in count(1) if k.bit_count()==(k*n).bit_count()) # Chai Wah Wu, Mar 11 2025

Formula

a((2^m)*n) = a(n) for all m >= 0 and n >= 1.
a(2^m + 1) = 2^(m + 1) - 1 for all m >= 0.
a(2^m - 1) = 2^m - 1 for all m >= 1.
a(2^m) = 1 for all m >= 0.

A325570 Numbers n that have no divisor d > 1 such that A048720(A065621(d),n/d) = n.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 25, 27, 29, 31, 37, 39, 41, 43, 47, 51, 53, 55, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 85, 87, 89, 91, 95, 97, 99, 101, 103, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 131, 137, 139, 141, 143, 145, 147, 149, 151, 157, 159, 163, 167, 169, 171, 173, 175, 177, 179, 181
Offset: 1

Views

Author

Antti Karttunen, May 10 2019

Keywords

Crossrefs

Positions of ones in A325565 and A325566.
Cf. A065091 (a subsequence), A325571 (the composite terms), A325572 (complement).
Subsequence of A005408 (odd numbers).

Programs

  • PARI
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    isA325570(n) = fordiv(n,d,if(A048720(A065621(n/d),d)==n,return(d==n)));

A114388 Transpose of table A115872.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 1, 6, 3, 4, 7, 2, 7, 4, 5, 3, 14, 3, 12, 5, 6, 7, 6, 15, 4, 14, 6, 7, 1, 14, 7, 28, 5, 15, 7, 8, 15, 2, 15, 12, 30, 6, 24, 8, 9, 7, 30, 3, 28, 14, 31, 7, 28, 9, 10, 3, 14, 31, 4, 30, 15, 56, 8, 30, 10, 11, 3, 6, 15, 60, 5, 31, 24, 60, 9, 31, 11, 12, 5, 6, 12, 28, 62, 6
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2006

Keywords

Crossrefs

Cf. A115872.
First row: A115873.

Programs

  • Mathematica
    X[a_, b_] := Module[{A, B, C, x},
         A = Reverse@IntegerDigits[a, 2];
         B = Reverse@IntegerDigits[b, 2];
         C = Expand[
            Sum[A[[i]]*x^(i - 1), {i, 1, Length[A]}]*
            Sum[B[[i]]*x^(i - 1), {i, 1, Length[B]}]];
         PolynomialMod[C, 2] /. x -> 2];
    S[n_, k_] := Module[{x = BitXor[n - 1, 2 n - 1], k0 = k},
         For[i = 1, True, i++,If[n*i == X[x, i],
         If[k0 == 1, Return[i], k0--]]]];
    T[n_, k_] := S[k, n];
    Table[T[n - k + 1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 04 2022 *)
Showing 1-6 of 6 results.