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

A359506 a(n) is the least integer m such that there exists a strictly increasing integer sequence n = b_1 < b_2 < ... < b_t = m with the property that b_1 XOR b_2 XOR ... XOR b_t = 0.

Original entry on oeis.org

0, 3, 5, 6, 7, 10, 9, 12, 11, 14, 13, 20, 15, 18, 17, 24, 19, 22, 21, 28, 23, 26, 25, 40, 27, 30, 29, 36, 31, 34, 33, 48, 35, 38, 37, 44, 39, 42, 41, 56, 43, 46, 45, 52, 47, 50, 49, 80, 51, 54, 53, 60, 55, 58, 57, 72, 59, 62, 61, 68, 63, 66, 65, 96, 67
Offset: 0

Views

Author

Peter Kagey, Jan 03 2023

Keywords

Comments

XOR is the bitwise XOR function, A003987.
This sequence is a bijection from the nonnegative integers to A057716, the nonpowers of 2.
Let's call the sequences mentioned in the definition as "zero-XOR sequences", and their last terms as "enders". a(n) is then the least possible ender for any zero-XOR sequence starting with n. - Antti Karttunen, Nov 25 2024

Examples

			For n = 19, a(19) = 28 with the sequence 19 XOR 20 XOR 27 XOR 28 = 0.
A table illustrating the first eleven terms:
   n |a(n)| sequence
  ---+----+-------------------
   0 |  0 |  0
   1 |  3 |  1 XOR  2 XOR  3
   2 |  5 |  2 XOR  3 XOR  4 XOR  5
   3 |  6 |  3 XOR  5 XOR  6
   4 |  7 |  4 XOR  5 XOR  6 XOR  7
   5 | 10 |  5 XOR  6 XOR  9 XOR 10
   6 |  9 |  6 XOR  7 XOR  8 XOR  9
   7 | 12 |  7 XOR 11 XOR 12
   8 | 11 |  8 XOR  9 XOR 10 XOR 11
   9 | 14 |  9 XOR 10 XOR 13 XOR 14
  10 | 13 | 10 XOR 11 XOR 12 XOR 13
		

Crossrefs

Cf. A003987, A057716, A359507, A359508, A378212 (a left inverse).
Cf. A006255, A275288, A277278, A277494, A300516, A329732 (variants of the theme).

Programs

  • Maple
    f:= proc(n) local k,S;
        S:= {n};
        for k from n+1 do
          S:= S union map(Bits:-Xor,S,k);
          if member(0,S) then return k fi;
        od;
    end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Jan 12 2023
  • Mathematica
    f[n_] := Module[{k, S}, S = {n}; For[k = n+1, True, k++, S = S  ~Union~ BitXor[S, k]; If[MemberQ[S, 0], Return[k]]]];
    f[0] = 0;
    f /@ Range[0, 100] (* Jean-François Alcover, Jan 22 2023, after Robert Israel *)
  • PARI
    a(n)= if (n==0, return (0), my (x=[n],y); for (m=n+1, oo, if (vecmin(y=[bitxor(v,m) | v<-x])==0, return (m), x=setunion(x,Set(y)))))  \\ Rémy Sigrist, Jan 12 2023

Formula

For n > 1, a(n) >= n + 3. a(4n) = 4n + 3 for n > 0. Conjecture: a(n) <= 5(n+1)/3. - Charles R Greathouse IV, Jan 12 2023
For all n >= 0, A378212(a(n)) = n. - Antti Karttunen, Nov 25 2024

A328045 a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1^c_1*b_2^c_2*...*b_t^c_t is a fourth power, with all c_i < 4.

Original entry on oeis.org

0, 1, 4, 6, 4, 10, 9, 14, 15, 9, 18, 22, 20, 26, 21, 24, 16, 34, 27, 38, 25, 28, 33, 46, 30, 25, 39, 35, 36, 58, 40, 62, 42, 44, 51, 45, 36, 74, 57, 52, 49, 82, 50, 86, 55, 54, 69, 94, 54, 49, 63, 68, 65, 106, 70, 66, 64, 76, 87, 118, 75, 122, 93, 77, 64, 78
Offset: 0

Views

Author

Peter Kagey, Oct 02 2019

Keywords

Comments

a(n) = n if and only if n is a perfect square.
a(n) >= n + A300518(n) if n is not a perfect square.
a(n) <= A006255(n), and a(n) = A006255(n) except for when n is in A328218, a subsequence of A269045.

Examples

			For n = 1, a(1) = 1   with sequence 1                =  1^4.
For n = 2, a(2) = 4   with sequence 2^2 * 4          =  2^4.
For n = 3, a(3) = 6   with sequence 3^2 * 4   *  6^2 =  6^4.
For n = 4, a(4) = 4   with sequence 4^2              =  2^4.
For n = 5, a(5) = 10  with sequence 5   * 8^3 * 10^3 = 40^4.
For n = 6, a(6) = 9   with sequence 6^2 * 8^2 *  9   = 12^4.
For n = 7, a(7) = 14  with sequence 7^2 * 8^2 * 14^2 = 28^4.
		

Crossrefs

Cf. A006255 (square), A277494 (cube).

A329732 a(n) is the smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1*b_2*...*b_t is a perfect cube.

Original entry on oeis.org

0, 1, 4, 9, 9, 18, 18, 21, 8, 16, 24, 33, 18, 39, 28, 30, 25, 51, 25, 57, 36, 36, 44, 69, 42, 36, 52, 27, 45, 87, 45, 93, 49, 55, 68, 60, 48, 111, 76, 65, 60, 123, 54, 129, 66, 54, 92, 141, 70, 56, 72, 85, 78, 159, 80, 80, 84, 95, 116, 177, 84, 183, 124, 84, 64
Offset: 0

Views

Author

Peter Kagey, Nov 19 2019

Keywords

Comments

For each k there exists a sufficiently large N such that for all primes p > N, a(k*p) = (k+2)*p. [We can prove the proposition is true for N = 64*(t*k)^2, where t = k*(k+1)*(k+2): there is a positive integer x such that t^2*x^3 < k*p < t^2*(x+1)^3 < t^2*x^3*(k+1)/k < (k+1)*p for p > N. So one increasing sequence starting with k*p, ending with (k+2)*p, and having a product which is a perfect cube is (k*p) * (t^2*(x+1)^3) * ((k+1)*p) * ((k+2)*p) = (t*p*(x+1))^3. Noticed that a(k*p) >= (k+2)*p (because b_1*b_2*...*b_t is divisible by p^3) for p > N, so a(k*p) = (k+2)*p. - Jinyuan Wang, Dec 22 2021]

Examples

			For n = 22, one increasing sequence starting with 22, ending with a(22) = 44, and having a product which is a perfect cube is 22 * 24 * 25 * 30 * 32 * 33 * 44 = 2640^3.
		

Crossrefs

A cube analog of R. L. Graham's sequence (A006255).
Cf. A277494.

Formula

a(p) = 3*p for all primes p >= 7.

Extensions

a(42)-a(43) and a(45) from David A. Corneth, Dec 25 2021
More terms from Jinyuan Wang, Dec 26 2021

A343825 Table read by antidiagonals upward: T(n,k) is the least m such that there exists a sequence k = b_1 <= b_2 <= ... <= b_t = m such that no term appears n or more times and the product of the sequence is of the form c^n, where c is an integer; n >= 1 and k >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 6, 3, 0, 1, 4, 8, 4, 0, 1, 4, 6, 4, 5, 0, 1, 4, 6, 9, 10, 6, 0, 1, 4, 6, 4, 10, 12, 7, 0, 1, 4, 6, 8, 10, 12, 14, 8, 0, 1, 4, 6, 4, 10, 9, 14, 15, 9, 0, 1, 4, 6, 8, 10, 9, 14, 8, 9, 10, 0, 1, 4, 6, 4, 10, 12, 14, 15, 16, 18, 11, 0, 1, 4
Offset: 1

Views

Author

Peter Kagey, Apr 30 2021

Keywords

Comments

For each prime p, the p-th row is a permutation of the nonprime integers.
T(n,k) <= A343881(n,k).
Conjecture: T(p,k) = A071537(k) for fixed k and sufficiently large prime p.

Examples

			Table begins:
  n\k | 0  1  2  3  4   5   6   7   8   9  10
------+--------------------------------------
    1 | 0, 1, 2, 3, 4,  5,  6,  7,  8,  9, 10
    2 | 0, 1, 6, 8, 4, 10, 12, 14, 15,  9, 18
    3 | 0, 1, 4, 6, 9, 10, 12, 14,  8, 16, 15
    4 | 0, 1, 4, 6, 4, 10,  9, 14, 15,  9, 18
    5 | 0, 1, 4, 6, 8, 10,  9, 14, 12, 15, 16
    6 | 0, 1, 4, 6, 4, 10, 12, 14,  8,  9, 15
    7 | 0, 1, 4, 6, 8, 10,  9, 14, 12, 15, 16
    8 | 0, 1, 4, 6, 4, 10,  9, 14, 12,  9, 16
Specifically,
T(2,3) =  8 because 3   * 6   * 8        = 12^2,
T(3,3) =  6 because 3   * 4^2 * 6^2      = 12^3,
T(3,5) = 10 because 5   * 6   * 9 * 10^2 = 30^3,
T(4,6) =  9 because 6^2 * 8^2 *      9^3 = 36^4, and
T(4,9) =  9 because 9^2                  =  3^4.
		

Crossrefs

Row n: A001477 (n=1), A006255 (n=2), A277494 (n=3), A328045 (n=4).
Cf. A071537.

A328143 Number of sequences [(b_1, c_1),...,(b_t, c_t)] such that n = b_1 < b_2 < ... < b_t = A328045(n), all c_i are positive integers less than 4, and b_1^c_1*b_2^c_2*...*b_t^c_t is a fourth power.

Original entry on oeis.org

3, 3, 2, 2, 1, 12, 2, 12, 12, 1, 12, 192, 12, 768, 12, 12, 3, 12288, 12, 49152, 2, 6, 48
Offset: 0

Views

Author

Peter Kagey, Oct 04 2019

Keywords

Comments

When does a(n) = 3*4^A260510(n)? It does for n = 0, 1, 5, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, ...
a(n) = 1 if n is square but not a fourth power.
a(k^4) = 3.
a(24) = 2, a(25) = 1, a(26) = 48, a(27) = 3, and a(28) = 2.

Examples

			For n = 21 the a(21) = 6 solutions are
21^2 *               27^2 * 28^2 =  126^4,
21^3 * 24^2 *        27^1 * 28^1 =  252^4,
21^2 *        25^2 * 27^2 * 28^2 =  630^4,
21^3 * 24^2 * 25^2 * 27^1 * 28^1 = 1260^4,
21^1 * 24^2 *        27^3 * 28^3 = 1512^4, and
21^1 * 24^2 * 25^2 * 27^3 * 28^3 = 7560^4.
		

Crossrefs

A259527 is the analog for squares.
Showing 1-5 of 5 results.