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-10 of 83 results. Next

A329329 Multiplicative operator of a ring over the positive integers that has A059897(.,.) as additive operator and is isomorphic to GF(2)[x,y] with A329050(i,j) the image of x^i * y^j.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 5, 4, 1, 1, 5, 9, 9, 5, 1, 1, 6, 7, 16, 7, 6, 1, 1, 7, 15, 25, 25, 15, 7, 1, 1, 8, 11, 36, 11, 36, 11, 8, 1, 1, 9, 27, 49, 35, 35, 49, 27, 9, 1, 1, 10, 25, 64, 13, 10, 13, 64, 25, 10, 1, 1, 11, 21, 81, 125, 77, 77, 125, 81
Offset: 1

Views

Author

Peter Munn, Nov 11 2019

Keywords

Comments

Square array A(n,k), n >= 1, k >= 1, read by descending antidiagonals.
The group defined by the binary operation A059897(.,.) over the positive integers is commutative with all elements self-inverse, and isomorphic to the additive group of GF(2) polynomial rings such as GF(2)[x,y]. There is a unique isomorphism extending each bijective mapping between respective minimal generating sets. The lexicographically earliest minimal generating set for the A059897 group is A050376, often called the Fermi-Dirac primes. This set has a natural arrangement in a square array, given by A329050(i,j) = prime(i+1)^(2^j), i >= 0, j >= 0. The most meaningful generating set for the additive group of GF(2)[x,y] is {x^i * y^j: i >= 0, j >= 0}, which similarly forms a square array. All this makes A329050(i,j) especially appropriate to be the image (under an isomorphism) of the GF(2) polynomial x^i * y^j.
Using g to denote the intended isomorphism, we specify g(x^i * y^j) = A329050(i,j). This maps minimal generating sets of the additive groups, so the definition of g is completed by specifying g(a+b) = A059897(g(a), g(b)). We then calculate the image under g of polynomial multiplication in GF(2)[x,y], giving us this sequence as the matching multiplicative operator for an isomorphic ring over the positive integers. Using f to denote the inverse of g, A[n,k] = g(f(n) * f(k)).
See the formula section for an alternative definition based on the A329050 array, independent of GF(2)[x,y].
Closely related to A306697 and A297845. If A059897 is replaced in the alternative definition by A059896 (and the definition is supplemented by the derived identity for the absorbing element, shown in the formula section), we get A306697; if A059897 is similarly replaced by A003991 (integer multiplication), we get A297845. This sequence and A306697, considered as multiplicative operators, are carryless arithmetic equivalents of A297845. A306697 uses a method analogous to binary-OR when there would be a multiplicative carry, while this sequence uses a method analogous to binary exclusive-OR. In consequence A(n,k) <> A297845(n,k) exactly when A306697(n,k) <> A297845(n,k). This relationship is not symmetric between the 3 sequences: there are n and k such that A(n,k) = A306697(n,k) <> A297845(n,k). For example A(54,72) = A306697(54,72) = 273375000 <> A297845(54,72) = 22143375000.

Examples

			Square array A(n, k) begins:
  n\k|  1   2   3    4    5    6    7     8     9    10    11    12
  ---+-------------------------------------------------------------
    1|  1   1   1    1    1    1    1     1     1     1     1     1
    2|  1   2   3    4    5    6    7     8     9    10    11    12
    3|  1   3   5    9    7   15   11    27    25    21    13    45
    4|  1   4   9   16   25   36   49    64    81   100   121   144
    5|  1   5   7   25   11   35   13   125    49    55    17   175
    6|  1   6  15   36   35   10   77   216   225   210   143   540
    7|  1   7  11   49   13   77   17   343   121    91    19   539
    8|  1   8  27   64  125  216  343    32   729  1000  1331  1728
    9|  1   9  25   81   49  225  121   729   625   441   169  2025
   10|  1  10  21  100   55  210   91  1000   441    22   187  2100
   11|  1  11  13  121   17  143   19  1331   169   187    23  1573
   12|  1  12  45  144  175  540  539  1728  2025  2100  1573    80
		

Crossrefs

A059897, A225546, A329050 are used to express relationship between terms of this sequence.
Related binary operations: A297845/A003991, A306697/A059896.

Programs

  • PARI
    \\ See Links section.

Formula

Alternative definition: (Start)
A(A329050(i_1, j_1), A329050(i_2, j_2)) = A329050(i_1+i_2, j_1+j_2).
A(A059897(n,k), m) = A059897(A(n,m), A(k,m)).
A(m, A059897(n,k)) = A059897(A(m,n), A(m,k)).
(End)
Derived identities: (Start)
A(n,1) = A(1,n) = 1 (1 is an absorbing element).
A(n,2) = A(2,n) = n.
A(n,k) = A(k,n).
A(n, A(m,k)) = A(A(n,m), k).
(End)
A(A019565(i), 2^j) = A019565(i)^j = A329332(i,j).
A(A225546(i), A225546(j)) = A225546(A(i,j)).
A(n,k) = A306697(n,k) = A297845(n,k), for n = A050376(i), k = A050376(j).
A(n,k) <= A306697(n,k) <= A297845(n,k).
A(n,k) < A297845(n,k) if and only if A306697(n,k) < A297845(n,k).

A284577 a(n) = A059897(A260443(n), A260443(1+n)).

Original entry on oeis.org

2, 6, 2, 30, 90, 270, 2, 210, 630, 6750, 2250, 378, 15750, 47250, 2, 2310, 6930, 6750, 630, 66150, 198450, 3402, 90, 14850, 24750, 92610, 30870, 14850, 8489250, 25467750, 2, 30030, 90090, 6750, 339570, 14850, 382016250, 372093750, 9843750, 1400726250, 4202178750, 3402, 198450, 20465156250, 7796250, 83531250, 90, 859950, 1433250, 1890
Offset: 0

Views

Author

Antti Karttunen, Apr 11 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A059897(A260443(n), A260443(1+n)).
a(n) = A277324(n) / A000290(A284578(n)).
A001222(a(n)) = A285107(n).

A307150 Row 6 of array in A059897.

Original entry on oeis.org

6, 3, 2, 24, 30, 1, 42, 12, 54, 15, 66, 8, 78, 21, 10, 96, 102, 27, 114, 120, 14, 33, 138, 4, 150, 39, 18, 168, 174, 5, 186, 48, 22, 51, 210, 216, 222, 57, 26, 60, 246, 7, 258, 264, 270, 69, 282, 32, 294, 75, 34, 312, 318, 9, 330, 84, 38, 87, 354, 40, 366, 93
Offset: 1

Views

Author

N. J. A. Sloane, Mar 29 2019

Keywords

Comments

From Peter Munn, Apr 02 2019: (Start)
Also column 6 of A059897.
A self-inverse permutation of the positive integers with no fixed points; A073675 composed with A120229.
The permutation swaps pairs of integers whose ratio is 1:6 or 2:3, these ratios corresponding to the factorizations 1*6 = 2*3 = 6. Row 6 is the first row of A059897 to exhibit more than 1 such ratio.
(End)
The integers in the pairs with ratio 1:6 are listed in A036668, the integers in the pairs with ratio 2:3 are listed in A325424. - Peter Munn, Mar 05 2020

Crossrefs

Formula

From Peter Munn, Apr 02 2019: (Start)
a(n) = A059897(6,n) = A059897(n,6).
a(n) = A073675(A120229(n)) = A120229(A073675(n)) = A073675(n) * A120229(n) / n.
(End)

Extensions

More terms from Alois P. Heinz, Mar 31 2019

A284567 a(0) = 1; for n >= 1, a(n) = A059897(n, a(n-1)).

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 20, 140, 70, 630, 63, 693, 8316, 108108, 30888, 51480, 823680, 14002560, 777920, 14780480, 739024, 15519504, 2821728, 64899744, 43266496, 1081662400, 166409600, 4493059200, 160466400, 4653525600, 3877938000, 120216078000, 15027009750, 495891321750, 14585038875, 20419054425, 9075135300, 335780006100
Offset: 0

Views

Author

Antti Karttunen, Apr 12 2017

Keywords

Crossrefs

Programs

Formula

a(0) = 1; for n >= 1, a(n) = A059897(n, a(n-1)).
n!/a(n) = A284568(n).
A001222(a(n)) = A284561(n).

A307151 Row 5 of array in A059897.

Original entry on oeis.org

5, 10, 15, 20, 1, 30, 35, 40, 45, 2, 55, 60, 65, 70, 3, 80, 85, 90, 95, 4, 105, 110, 115, 120, 125, 130, 135, 140, 145, 6, 155, 160, 165, 170, 7, 180, 185, 190, 195, 8, 205, 210, 215, 220, 9, 230, 235, 240, 245, 250, 255, 260, 265, 270, 11, 280, 285, 290, 295
Offset: 1

Views

Author

Peter Munn and N. J. A. Sloane, Mar 29 2019

Keywords

Comments

Also column 5 of A059897.
A self-inverse permutation of the positive integers with no fixed points that swaps pairs of integers whose ratio is 1:5.

Crossrefs

Cf. A059897.
Has same start as A283442 but that sequence is different (it has repeated terms).

Programs

  • Maple
    a:= n-> `if`(padic[ordp](n, 5)::odd, n/5, n*5):
    seq(a(n), n=1..60);

Formula

a(n) = A059897(5,n) = A059897(n,5).

Extensions

More terms from Alois P. Heinz, Mar 31 2019

A307266 Row 8 of array in A059897.

Original entry on oeis.org

8, 4, 24, 2, 40, 12, 56, 1, 72, 20, 88, 6, 104, 28, 120, 128, 136, 36, 152, 10, 168, 44, 184, 3, 200, 52, 216, 14, 232, 60, 248, 64, 264, 68, 280, 18, 296, 76, 312, 5, 328, 84, 344, 22, 360, 92, 376, 384, 392, 100, 408, 26, 424, 108, 440, 7, 456, 116, 472, 30, 488, 124, 504, 32
Offset: 1

Views

Author

Peter Munn, Apr 01 2019

Keywords

Comments

Also column 8 of A059897.
A self-inverse permutation of the positive integers with no fixed points; A073675 composed with A120230.
The permutation swaps pairs of integers whose ratio is 1:8 or 1:2, these ratios corresponding to the factorizations 1*8 = 2*4 = 8.

Crossrefs

Programs

  • PARI
    T(n, k) = {if (n==1, return (k)); if (k==1, return (n)); my(fn=factor(n), fk=factor(k)); vp = setunion(fn[, 1]~, fk[, 1]~); prod(i=1, #vp, vp[i]^(bitxor(valuation(n, vp[i]), valuation(k, vp[i])))); }
    a(n) = T(n, 8); \\ Michel Marcus, Apr 23 2019

Formula

a(n) = A059897(8,n) = A059897(n,8).
a(n) = A073675(A120230(n)) = A120230(A073675(n)) = A073675(n) * A120230(n) / n.

A307267 Row 24 of array in A059897.

Original entry on oeis.org

24, 12, 8, 6, 120, 4, 168, 3, 216, 60, 264, 2, 312, 84, 40, 384, 408, 108, 456, 30, 56, 132, 552, 1, 600, 156, 72, 42, 696, 20, 744, 192, 88, 204, 840, 54, 888, 228, 104, 15, 984, 28, 1032, 66, 1080, 276, 1128, 128, 1176, 300, 136, 78, 1272, 36, 1320, 21, 152, 348, 1416, 10
Offset: 1

Views

Author

Peter Munn, Apr 01 2019

Keywords

Comments

Also column 24 of A059897.
A self-inverse permutation of the positive integers with no fixed points; a composition of A073675, A120229 and A120230.
The permutation swaps pairs of integers whose ratio is 1:24, 1:6, 3:8 or 2:3, these ratios corresponding to the factorizations 1*24 = 2*12 = 3*8 = 4*6 = 24. Row 24 is the first row of A059897 to exhibit more than 2 such ratios.

Crossrefs

Programs

  • PARI
    T(n, k) = {if (n==1, return (k)); if (k==1, return (n)); my(fn=factor(n), fk=factor(k)); vp = setunion(fn[, 1]~, fk[, 1]~); prod(i=1, #vp, vp[i]^(bitxor(valuation(n, vp[i]), valuation(k, vp[i])))); }
    a(n) = T(n, 24); \\ Michel Marcus, Apr 23 2019

Formula

a(n) = A059897(24,n) = A059897(n,24).
a(n) = A073675(A120229(A120230(n))) = A073675(n) * A120229(n) * A120230(n) / n^2.

A329330 Multiplication operation of a ring over the positive integers that has A059897(.,.) as addition operation and is isomorphic to GF(2)[x] with polynomial x^i mapped to A050376(i+1). Square array read by descending antidiagonals: A(n,k), n >= 1, k >= 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 4, 1, 1, 5, 5, 5, 5, 1, 1, 6, 7, 7, 7, 6, 1, 1, 7, 12, 9, 9, 12, 7, 1, 1, 8, 9, 20, 11, 20, 9, 8, 1, 1, 9, 15, 11, 35, 35, 11, 15, 9, 1, 1, 10, 11, 28, 13, 8, 13, 28, 11, 10, 1, 1, 11, 21, 13, 45, 63, 63, 45, 13, 21, 11, 1
Offset: 1

Views

Author

Peter Munn, Nov 10 2019

Keywords

Comments

When creating A329329, the author realized it was isomorphic to multiplication in the GF(2)[x,y] polynomial ring. However, A329329 was unusual in having A059897(.,.) as additive operator, whereas the equivalent univariate polynomial ring, GF(2)[x], is more commonly mapped (to integers) with bitwise exclusive-or (A003987) representing polynomial addition (and A048720(.,.) representing polynomial multiplication). This sequence shows how multiplication in GF(2)[x] can look when mapped to integers with A059897(.,.) representing polynomial addition.
The group defined by the binary operation A059897(.,.) over the positive integers is commutative with all elements self-inverse, and isomorphic to the additive group of the polynomial ring GF(2)[x]. There is a unique isomorphism extending each bijective mapping between respective minimal generating sets. The lexicographically earliest minimal generating set for the A059897 group is A050376, often called the Fermi-Dirac primes. The most meaningful generating set for the additive group of GF(2)[x] is {x^i: i >= 0}.
Using f to denote the intended isomorphism from GF(2)[x], we specify f(x^i) = A050376(i+1). This maps minimal generating sets of the additive groups, so the definition of f is completed by specifying f(a+b) = A059897(f(a), f(b)). We then calculate the image under f of polynomial multiplication in GF(2)[x], giving us this sequence as the matching multiplication operation for an isomorphic ring over the positive integers. Using g to denote the inverse of f, A(n,k) = f(g(n) * g(k)).
Note that A050376 is closed with respect to A(.,.).
Recall that GF(2)[x] is more usually mapped to integers with A003987(.,.) as addition and A048720(.,.) as multiplication. With this usual mapping, under which A000079(i) is the image of x^i, A052330(.) is the relevant isomorphism from nonnegative integers under A048720(.,.) and A003987(.,.) to positive integers under A(.,.) and A059897(.,.), with A052331(.) its inverse.

Examples

			Square array A(n,k) begins:
  n\k |  1    2    3    4    5    6    7    8    9   10   11   12
  ----+----------------------------------------------------------
   1  |  1    1    1    1    1    1    1    1    1    1    1    1
   2  |  1    2    3    4    5    6    7    8    9   10   11   12
   3  |  1    3    4    5    7   12    9   15   11   21   13   20
   4  |  1    4    5    7    9   20   11   28   13   36   16   35
   5  |  1    5    7    9   11   35   13   45   16   55   17   63
   6  |  1    6   12   20   35    8   63  120   99  210  143   15
   7  |  1    7    9   11   13   63   16   77   17   91   19   99
   8  |  1    8   15   28   45  120   77   14  117  360  176  420
   9  |  1    9   11   13   16   99   17  117   19  144   23  143
  10  |  1   10   21   36   55  210   91  360  144   22  187  756
  11  |  1   11   13   16   17  143   19  176   23  187   25  208
  12  |  1   12   20   35   63   15   99  420  143  756  208   28
		

Crossrefs

Distributes over A059897, and isomorphic to A048720 over A003987, with A052331 (inverse A052330) as isomorphism.
Row/column 3: A300841.
Row/column k sorted into increasing order: A003159 (k=3), A339690 (k=4), A000379 (k=6).
Subsequences of row/column k: A240521 (k=6), A240522 (k=8), A240536 (k=10), A240524 (k=24), A241025 (k=30), A241024 (k=40).

Formula

A(n,k) = A052330(A048720(A052331(n), A052331(k))), n >= 1, k >= 1.
A059897-based definition: (Start)
A(A050376(i), A050376(j)) = A050376(i+j-1).
A(A059897(n,k), m) = A059897(A(n,m), A(k,m)).
A(m, A059897(n,k)) = A059897(A(m,n), A(m,k)).
(End)
Derived identities: (Start)
A(n,1) = A(1,n) = 1.
A(n,2) = A(2,n) = n.
A(n,k) = A(k,n).
A(n, A(m,k)) = A(A(n,m), k).
(End)
A(A300841(n), k) = A(n, A300841(k)) = A300841(A(n,k)).
A(n,3) = A(3,n) = A300841(n).
A(n,4) = A(4,n) = A300841^2(n).
A(n,5) = A(5,n) = A300841^3(n).
A(A050376(m), 6) = A(6, A050376(m)) = A240521(m).
A(n,7) = A(7,n) = A300841^4(n).
A(A050376(m), 8) = A(8, A050376(m)) = A240522(m).
A(n,9) = A(9,n) = A300841^5(n).
A(A050376(m), 10) = A(10, A050376(m)) = A240536(m).
A(A050376(m), 12) = A(12, A050376(m)) = A300841(A240521(m)).
A(A050376(m), 24) = A(24, A050376(m)) = A240524(m).
A(A050376(m), 30) = A(30, A050376(m)) = A241025(m).
A(A050376(m), 40) = A(40, A050376(m)) = A241024(m).

A019565 The squarefree numbers ordered lexicographically by their prime factorization (with factors written in decreasing order). a(n) = Product_{k in I} prime(k+1), where I is the set of indices of nonzero binary digits in n = Sum_{k in I} 2^k.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 42, 35, 70, 105, 210, 11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310, 13, 26, 39, 78, 65, 130, 195, 390, 91, 182, 273, 546, 455, 910, 1365, 2730, 143, 286, 429, 858, 715, 1430, 2145, 4290
Offset: 0

Views

Author

Keywords

Comments

A permutation of the squarefree numbers A005117. The missing positive numbers are in A013929. - Alois P. Heinz, Sep 06 2014
From Antti Karttunen, Apr 18 & 19 2017: (Start)
Because a(n) toggles the parity of n there are neither fixed points nor any cycles of odd length.
Conjecture: there are no finite cycles of any length. My grounds for this conjecture: any finite cycle in this sequence, if such cycles exist at all, must have at least one member that occurs somewhere in A285319, the terms that seem already to be quite rare. Moreover, any such a number n should satisfy in addition to A019565(n) < n also that A048675^{k}(n) is squarefree, not just for k=0, 1 but for all k >= 0. As there is on average a probability of only 6/(Pi^2) = 0.6079... that any further term encountered on the trajectory of A048675 is squarefree, the total chance that all of them would be squarefree (which is required from the elements of A019565-cycles) is soon minuscule, especially as A048675 is not very tightly bounded (many trajectories seem to skyrocket, at least initially). I am also assuming that usually there is no significant correlation between the binary expansions of n and A048675(n) (apart from their least significant bits), or, for that matter, between their prime factorizations.
See also the slightly stronger conjecture in A285320, which implies that there would neither be any two-way infinite cycles.
If either of the conjectures is false (there are cycles), then certainly neither sequence A285332 nor its inverse A285331 can be a permutation of natural numbers. (End)
The conjecture made in A087207 (see also A288569) implies the two conjectures mentioned above. A further constraint for cycles is that in any A019565-trajectory which starts from a squarefree number (A005117), every other term is of the form 4k+2, while every other term is of the form 6k+3. - Antti Karttunen, Jun 18 2017
The sequence satisfies the exponential function identity, a(x + y) = a(x) * a(y), whenever x and y do not have a 1-bit in the same position, i.e., when A004198(x,y) = 0. See also A283475. - Antti Karttunen, Oct 31 2019
The above identity becomes unconditional if binary exclusive OR, A003987(.,.), is substituted for addition, and A059897(.,.), a multiplicative equivalent of A003987, is substituted for multiplication. This gives us a(A003987(x,y)) = A059897(a(x), a(y)). - Peter Munn, Nov 18 2019
Also the Heinz number of the binary indices of n, where the Heinz number of a sequence (y_1,...,y_k) is prime(y_1)*...*prime(y_k), and a number's binary indices (A048793) are the positions of 1's in its reversed binary expansion. - Gus Wiseman, Dec 28 2022

Examples

			5 = 2^2+2^0, e_1 = 2, e_2 = 0, prime(2+1) = prime(3) = 5, prime(0+1) = prime(1) = 2, so a(5) = 5*2 = 10.
From _Philippe Deléham_, Jun 03 2015: (Start)
This sequence regarded as a triangle withs rows of lengths 1, 1, 2, 4, 8, 16, ...:
   1;
   2;
   3,  6;
   5, 10, 15, 30;
   7, 14, 21, 42, 35,  70, 105, 210;
  11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310;
  ...
(End)
From _Peter Munn_, Jun 14 2020: (Start)
The initial terms are shown below, equated with the product of their prime factors to exhibit the lexicographic order. We start with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
   n     a(n)
   0     1 = .
   1     2 = 2.
   2     3 = 3.
   3     6 = 3*2.
   4     5 = 5.
   5    10 = 5*2.
   6    15 = 5*3.
   7    30 = 5*3*2.
   8     7 = 7.
   9    14 = 7*2.
  10    21 = 7*3.
  11    42 = 7*3*2.
  12    35 = 7*5.
(End)
		

Crossrefs

Row 1 of A285321.
Equivalent sequences for k-th-power-free numbers: A101278 (k=3), A101942 (k=4), A101943 (k=5), A054842 (k=10).
Cf. A109162 (iterates).
Cf. also A048675 (a left inverse), A087207, A097248, A260443, A054841.
Cf. A285315 (numbers for which a(n) < n), A285316 (for which a(n) > n).
Cf. A276076, A276086 (analogous sequences for factorial and primorial bases), A334110 (terms squared).
For partial sums see A288570.
A003961, A003987, A004198, A059897, A089913, A331590, A334747 are used to express relationships between sequence terms.
Column 1 of A329332.
Even bisection (which contains the odd terms): A332382.
A160102 composed with A052330, and subsequence of the latter.
Related to A000079 via A225546, to A057335 via A122111, to A008578 via A336322.
Least prime index of a(n) is A001511.
Greatest prime index of a(n) is A029837 or A070939.
Taking prime indices gives A048793, reverse A272020, row sums A029931.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Haskell
    a019565 n = product $ zipWith (^) a000040_list (a030308_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    
  • Maple
    a:= proc(n) local i, m, r; m:=n; r:=1;
          for i while m>0 do if irem(m,2,'m')=1
            then r:=r*ithprime(i) fi od; r
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 06 2014
  • Mathematica
    Do[m=1;o=1;k1=k;While[ k1>0, k2=Mod[k1, 2];If[k2\[Equal]1, m=m*Prime[o]];k1=(k1-k2)/ 2;o=o+1];Print[m], {k, 0, 55}] (* Lei Zhou, Feb 15 2005 *)
    Table[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 55}]  (* Michael De Vlieger, Aug 27 2016 *)
    b[0] := {1}; b[n_] := Flatten[{ b[n - 1], b[n - 1] * Prime[n] }];
      a = b[6] (* Fred Daniel Kline, Jun 26 2017 *)
  • PARI
    a(n)=factorback(vecextract(primes(logint(n+!n,2)+1),n))  \\ M. F. Hasler, Mar 26 2011, updated Aug 22 2014, updated Mar 01 2018
    
  • Python
    from operator import mul
    from functools import reduce
    from sympy import prime
    def A019565(n):
        return reduce(mul,(prime(i+1) for i,v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1
    # Chai Wah Wu, Dec 25 2014
    
  • Scheme
    (define (A019565 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) p) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p))))) ;; (Requires only the implementation of A000040 for prime numbers.) - Antti Karttunen, Apr 20 2017

Formula

G.f.: Product_{k>=0} (1 + prime(k+1)*x^2^k), where prime(k)=A000040(k). - Ralf Stephan, Jun 20 2003
a(n) = f(n, 1, 1) with f(x, y, z) = if x > 0 then f(floor(x/2), y*prime(z)^(x mod 2), z+1) else y. - Reinhard Zumkeller, Mar 13 2010
For all n >= 0: A048675(a(n)) = n; A013928(a(n)) = A064273(n). - Antti Karttunen, Jul 29 2015
a(n) = a(2^x)*a(2^y)*a(2^z)*... = prime(x+1)*prime(y+1)*prime(z+1)*..., where n = 2^x + 2^y + 2^z + ... - Benedict W. J. Irwin, Jul 24 2016
From Antti Karttunen, Apr 18 2017 and Jun 18 2017: (Start)
a(n) = A097248(A260443(n)), a(A005187(n)) = A283475(n), A108951(a(n)) = A283477(n).
A055396(a(n)) = A001511(n), a(A087207(n)) = A007947(n). (End)
a(2^n - 1) = A002110(n). - Michael De Vlieger, Jul 05 2017
a(n) = A225546(A000079(n)). - Peter Munn, Oct 31 2019
From Peter Munn, Mar 04 2022: (Start)
a(2n) = A003961(a(n)); a(2n+1) = 2*a(2n).
a(x XOR y) = A059897(a(x), a(y)) = A089913(a(x), a(y)), where XOR denotes bitwise exclusive OR (A003987).
a(n+1) = A334747(a(n)).
a(x+y) = A331590(a(x), a(y)).
a(n) = A336322(A008578(n+1)).
(End)

Extensions

Definition corrected by Klaus-R. Löffler, Aug 20 2014
New name from Peter Munn, Jun 14 2020

A006519 Highest power of 2 dividing n.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 64, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2
Offset: 1

Views

Author

Keywords

Comments

Least positive k such that m^k + 1 divides m^n + 1 (with fixed base m). - Vladimir Baltic, Mar 25 2002
To construct the sequence: start with 1, concatenate 1, 1 and double last term gives 1, 2. Concatenate those 2 terms, 1, 2, 1, 2 and double last term 1, 2, 1, 2 -> 1, 2, 1, 4. Concatenate those 4 terms: 1, 2, 1, 4, 1, 2, 1, 4 and double last term -> 1, 2, 1, 4, 1, 2, 1, 8, etc. - Benoit Cloitre, Dec 17 2002
a(n) = gcd(seq(binomial(2*n, 2*m+1)/2, m = 0 .. n - 1)) (odd numbered entries of even numbered rows of Pascal's triangle A007318 divided by 2), where gcd() denotes the greatest common divisor of a set of numbers. Due to the symmetry of the rows it suffices to consider m = 0 .. floor((n-1)/2). - Wolfdieter Lang, Jan 23 2004
Equals the continued fraction expansion of a constant x (cf. A100338) such that the continued fraction expansion of 2*x interleaves this sequence with 2's: contfrac(2*x) = [2; 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 8, 2, ...].
Simon Plouffe observes that this sequence and A003484 (Radon function) are very similar, the difference being all zeros except for every 16th term (see A101119 for nonzero differences). Dec 02 2004
This sequence arises when calculating the next odd number in a Collatz sequence: Next(x) = (3*x + 1) / A006519, or simply (3*x + 1) / BitAnd(3*x + 1, -3*x - 1). - Jim Caprioli, Feb 04 2005
a(n) = n if and only if n = 2^k. This sequence can be obtained by taking a(2^n) = 2^n in place of a(2^n) = n and using the same sequence building approach as in A001511. - Amarnath Murthy, Jul 08 2005
Also smallest m such that m + n - 1 = m XOR (n - 1); A086799(n) = a(n) + n - 1. - Reinhard Zumkeller, Feb 02 2007
Number of 1's between successive 0's in A159689. - Philippe Deléham, Apr 22 2009
Least number k such that all coefficients of k*E(n, x), the n-th Euler polynomial, are integers (cf. A144845). - Peter Luschny, Nov 13 2009
In the binary expansion of n, delete everything left of the rightmost 1 bit. - Ralf Stephan, Aug 22 2013
The equivalent sequence for partitions is A194446. - Omar E. Pol, Aug 22 2013
Also the 2-adic value of 1/n, n >= 1. See the Mahler reference, definition on p. 7. This is a non-archimedean valuation. See Mahler, p. 10. Sometimes called 2-adic absolute value of 1/n. - Wolfdieter Lang, Jun 28 2014
First 2^(k-1) - 1 terms are also the heights of the successive rectangles and squares of width 2 that are adjacent to any of the four sides of the toothpick structure of A139250 after 2^k stages, with k >= 2. For example: if k = 5 the heights after 32 stages are [1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1] respectively, the same as the first 15 terms of this sequence. - Omar E. Pol, Dec 29 2020

Examples

			2^3 divides 24, but 2^4 does not divide 24, so a(24) = 8.
2^0 divides 25, but 2^1 does not divide 25, so a(25) = 1.
2^1 divides 26, but 2^2 does not divide 26, so a(26) = 2.
Per _Marc LeBrun_'s 2000 comment, a(n) can also be determined with bitwise operations in two's complement. For example, given n = 48, we see that n in binary in an 8-bit byte is 00110000 while -n is 11010000. Then 00110000 AND 11010000 = 00010000, which is 16 in decimal, and therefore a(48) = 16.
G.f. = x + 2*x^2 + x^3 + 4*x^4 + x^5 + 2*x^6 + x^7 + 8*x^8 + x^9 + ...
		

References

  • Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums are in A006520, second partial sums in A022560.
Sequences used in definitions of this sequence: A000079, A001511, A004198, A007814.
Sequences with related definitions: A038712, A171977, A135481 (GS(1, 6)).
This is Guy Steele's sequence GS(5, 2) (see A135416).
Related to A007913 via A225546.
A059897 is used to express relationship between sequence terms.
Cf. A091476 (Dgf at s=2).

Programs

  • Haskell
    import Data.Bits ((.&.))
    a006519 n = n .&. (-n) :: Integer
    -- Reinhard Zumkeller, Mar 11 2012, Dec 29 2011
    
  • Julia
    using IntegerSequences
    [EvenPart(n) for n in 1:102] |> println  # Peter Luschny, Sep 25 2021
    
  • Magma
    [2^Valuation(n, 2): n in [1..100]]; // Vincenzo Librandi, Mar 27 2015
    
  • Maple
    with(numtheory): for n from 1 to 200 do if n mod 2 = 1 then printf(`%d,`,1) else printf(`%d,`,2^ifactors(n)[2][1][2]) fi; od:
    A006519 := proc(n) if type(n,'odd') then 1 ; else for f in ifactors(n)[2] do if op(1,f) = 2 then return 2^op(2,f) ; end if; end do: end if; end proc: # R. J. Mathar, Oct 25 2010
    A006519 := n -> 2^padic[ordp](n,2): # Peter Luschny, Nov 26 2010
  • Mathematica
    lowestOneBit[n_] := Block[{k = 0}, While[Mod[n, 2^k] == 0, k++]; 2^(k - 1)]; Table[lowestOneBit[n], {n, 102}] (* Robert G. Wilson v Nov 17 2004 *)
    Table[2^IntegerExponent[n, 2], {n, 128}] (* Jean-François Alcover, Feb 10 2012 *)
    Table[BitAnd[BitNot[i - 1], i], {i, 1, 102}] (* Peter Luschny, Oct 10 2019 *)
  • PARI
    {a(n) = 2^valuation(n, 2)};
    
  • PARI
    a(n)=1<Joerg Arndt, Jun 10 2011
    
  • PARI
    a(n)=bitand(n,-n); \\ Joerg Arndt, Jun 10 2011
    
  • PARI
    a(n)=direuler(p=2,n,if(p==2,1/(1-2*X),1/(1-X)))[n] \\ Ralf Stephan, Mar 27 2015
    
  • Python
    def A006519(n): return n&-n # Chai Wah Wu, Jul 06 2022
  • Scala
    (1 to 128).map(Integer.lowestOneBit()) // _Alonso del Arte, Mar 04 2020
    

Formula

a(n) = n AND -n (where "AND" is bitwise, and negative numbers are represented in two's complement in a suitable bit width). - Marc LeBrun, Sep 25 2000, clarified by Alonso del Arte, Mar 16 2020
Also: a(n) = gcd(2^n, n). - Labos Elemer, Apr 22 2003
Multiplicative with a(p^e) = p^e if p = 2; 1 if p > 2. - David W. Wilson, Aug 01 2001
G.f.: Sum_{k>=0} 2^k*x^2^k/(1 - x^2^(k+1)). - Ralf Stephan, May 06 2003
Dirichlet g.f.: zeta(s)*(2^s - 1)/(2^s - 2) = zeta(s)*(1 - 2^(-s))/(1 - 2*2^(-s)). - Ralf Stephan, Jun 17 2007
a(n) = 2^floor(A002487(n - 1) / A002487(n)). - Reikku Kulon, Oct 05 2008
a(n) = 2^A007814(n). - R. J. Mathar, Oct 25 2010
a((2*k - 1)*2^e) = 2^e, k >= 1, e >= 0. - Johannes W. Meijer, Jun 07 2011
a(n) = denominator of Euler(n-1, 1). - Arkadiusz Wesolowski, Jul 12 2012
a(n) = A011782(A001511(n)). - Omar E. Pol, Sep 13 2013
a(n) = (n XOR floor(n/2)) XOR (n-1 XOR floor((n-1)/2)) = n - (n AND n-1) (where "AND" is bitwise). - Gary Detlefs, Jun 12 2014
a(n) = ((n XOR n-1)+1)/2. - Gary Detlefs, Jul 02 2014
a(n) = A171977(n)/2. - Peter Kern, Jan 04 2017
a(n) = 2^(A001511(n)-1). - Doug Bell, Jun 02 2017
a(n) = abs(A003188(n-1) - A003188(n)). - Doug Bell, Jun 02 2017
Conjecture: a(n) = (1/(A000203(2*n)/A000203(n)-2)+1)/2. - Velin Yanev, Jun 30 2017
a(n) = (n-1) o n where 'o' is the bitwise converse nonimplication. 'o' is not commutative. n o (n+1) = A135481(n). - Peter Luschny, Oct 10 2019
From Peter Munn, Dec 13 2019: (Start)
a(A225546(n)) = A225546(A007913(n)).
a(A059897(n,k)) = A059897(a(n), a(k)). (End)
Sum_{k=1..n} a(k) ~ (1/(2*log(2)))*n*log(n) + (3/4 + (gamma-1)/(2*log(2)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
a(n) = n / A000265(n). - Amiram Eldar, May 22 2025

Extensions

More terms from James Sellers, Jun 20 2000
Showing 1-10 of 83 results. Next