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.

A333403 Lexicographically earliest sequence of positive integers such that for any m and n with m <= n, a(m) XOR ... XOR a(n) is neither null nor prime (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

1, 8, 1, 48, 1, 8, 1, 68, 1, 8, 1, 48, 1, 8, 1, 1158, 1, 8, 1, 48, 1, 8, 1, 68, 1, 8, 1, 48, 1, 8, 1, 4752, 1, 8, 1, 48, 1, 8, 1, 68, 1, 8, 1, 48, 1, 8, 1, 1158, 1, 8, 1, 48, 1, 8, 1, 68, 1, 8, 1, 48, 1, 8, 1, 81926, 1, 8, 1, 48, 1, 8, 1, 68, 1, 8, 1, 48, 1, 8
Offset: 1

Views

Author

Rémy Sigrist, Mar 22 2020

Keywords

Comments

This sequence is a variant of A332941.
This sequence is infinite:
- suppose that the first n terms are known,
- let M = max_{k <= n} a(k) XOR ... XOR a(n),
- let k be such that M < 2^k,
- as there are prime gaps of any size,
we can choose an interval of the form [m*2^k..(m+1)*2^k] without prime numbers,
- hence a(n+1) <= m*2^k, QED.

Examples

			The values of a(i) XOR ... XOR a(j) for i <= j <= 8 are:
  i\j|  1  2  3   4   5   6   7    8
  ---+------------------------------
    1|  1  9  8  56  57  49  48  116
    2|  .  8  9  57  56  48  49  117
    3|  .  .  1  49  48  56  57  125
    4|  .  .  .  48  49  57  56  124
    5|  .  .  .  .    1   9   8   76
    6|  .  .  .  .   .    8   9   77
    7|  .  .  .  .   .   .    1   69
    8|  .  .  .  .   .   .   .    68
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(m) = a(n) iff A007814(n) = A007814(m).
a(n) = a(2^k-n) for any k >= 0 and n = 1..2^k-1.

A171465 Lexicographically earliest positive integer sequence such that no sum of consecutive terms is a positive square.

Original entry on oeis.org

2, 3, 2, 3, 2, 3, 2, 3, 2, 12, 5, 5, 8, 5, 5, 3, 2, 5, 13, 10, 14, 10, 5, 3, 3, 2, 5, 5, 5, 3, 20, 7, 3, 2, 5, 5, 5, 7, 6, 5, 23, 5, 6, 6, 2, 3, 2, 5, 5, 3, 37, 5, 5, 5, 5, 3, 5, 5, 5, 19, 8, 13, 2, 5, 28, 5, 7, 5, 5, 2, 15, 38, 5, 3, 2, 3, 2, 3, 2, 32, 18, 17, 6, 5, 13, 6, 33, 11, 2, 15, 22, 2, 3, 17
Offset: 1

Views

Author

John W. Layman, Dec 09 2009

Keywords

Comments

Let T(a) be the sequence of all positive integers (in order of increasing magnitude) that are not a sum of any number of consecutive terms of a, and let s be the sequence of positive squares. An interesting question is whether T(a) = s. Calculation shows that if 100 terms of a are used then T(a) agrees with s for the first 13 terms; if 1000 terms of a are used then T(a) agrees with s for the first 57 terms.

Crossrefs

Cf. A168677, A332941 (prime variant).

Programs

  • PARI
    See Links section.

A360019 Lexicographically earliest increasing sequence of positive numbers in which no nonempty subsequence of consecutive terms sums to a triangular number.

Original entry on oeis.org

2, 5, 7, 11, 12, 14, 16, 17, 18, 19, 20, 22, 25, 26, 30, 31, 34, 35, 37, 42, 46, 49, 52, 54, 59, 63, 64, 68, 72, 73, 77, 80, 81, 84, 85, 87, 92, 93, 94, 98, 100, 101, 108, 113, 115, 117, 118, 121, 122, 123, 125, 129, 130, 132, 133, 134, 141, 142, 143, 146, 149
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 21 2023

Keywords

Comments

The sequence cannot contain any triangular numbers.

Examples

			a(0) = 2 by the definition of the sequence. The next number > a(0) is 3, but it is a triangular number, so we try 4, but 2 + 4 = 6 is a triangular number. Then we try 5; {5, 2 + 5} are not triangular numbers, thus a(1) = 5. a(2) cannot be 6, so we try 7; {7, 5 + 7, 2 + 5 + 7} are not triangular numbers, thus a(2) = 7.
		

Crossrefs

Programs

  • Maple
    q:= proc(n) option remember; issqr(8*n+1) end:
    s:= proc(i, j) option remember; `if`(i>j, 0, a(j)+s(i, j-1)) end:
    a:= proc(n) option remember; local k; for k from 1+a(n-1) while
          ormap(q, [k+s(i, n-1)$i=0..n]) do od; k
        end: a(-1):=-1:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 21 2023
  • Mathematica
    triQ[n_] := IntegerQ @ Sqrt[8*n + 1]; a[0] = 2; a[n_] := a[n] = Module[{k = a[n - 1] + 1, t = Accumulate @ Table[a[i], {i, n - 1, 0, -1}]}, While[triQ[k] || AnyTrue[t + k, triQ], k++]; k]; Array[a, 61, 0] (* Amiram Eldar, Jan 21 2023 *)

Extensions

More terms from Jon E. Schoenfield, Jan 21 2023

A360028 Lexicographically earliest sequence of positive numbers in which no nonempty subsequence of consecutive terms sums to a semiprime.

Original entry on oeis.org

1, 1, 1, 16, 1, 11, 1, 11, 30, 30, 79, 17, 44, 28, 12, 30, 150, 144, 252, 304, 20, 300, 132, 12, 252, 234, 18, 112, 32, 456, 52, 520, 60, 28, 120, 180, 162, 2, 52, 324, 42, 130, 20, 60, 100, 92, 132, 126, 186, 184, 104, 12, 104, 320, 8, 12, 20, 320, 104, 16, 32, 208, 404, 240, 300, 60, 408
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 22 2023

Keywords

Comments

The sequence cannot contain any semiprimes.
It appears that a(n) is always even for n > 11. - Thomas Scheuerle, Feb 15 2023

Examples

			a(0) = 1 by the definition of the sequence. For the next number we try 1; {1, 1 + 1} are not semiprimes, thus a(1) = 1. For the next number we try 1; {1, 1 + 1, 1 + 1 + 1} are not semiprimes, thus a(2) = 1.
		

Crossrefs

Programs

  • MATLAB
    function a = A360028(max_n)
        a = 1; s = 1;
        while length(a) < max_n
            sn = [s+1 1];
            while(~isempty(find(arrayfun(@(x)(length(factor(x))),sn)==2, 1)))
                sn = sn+1;
            end
            s = sn; a = [a sn(end)];
        end
    end % Thomas Scheuerle, Jan 22 2023

A359246 Lexicographically earliest sequence of positive numbers in which no nonempty subsequence of consecutive terms sums to a triangular number.

Original entry on oeis.org

2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 20, 2, 7, 2, 7, 2, 14, 9, 7, 2, 7, 2, 29, 2, 7, 2, 7, 2, 7, 2, 41, 9, 9, 16, 22, 2, 23, 7, 2, 7, 2, 7, 2, 7, 22, 9, 2, 7, 2, 7, 43, 9, 29, 2, 41, 9, 7, 2, 9, 5, 2, 7, 2, 22, 9, 9, 9, 25, 9, 29, 2, 7, 2, 7, 2, 32, 43, 65, 5, 2, 2
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 21 2023

Keywords

Comments

Differences of A030194.

Examples

			a(0) = 2 by the definition of the sequence. The next number >= 2 is 2; {2, 2 + 2} are not triangular numbers, thus a(1) = 2. Then we try 2; but 2 + 2 + 2 is a triangular number. We cannot try 3, which is a triangular number, so we try 4; but 4 + 2 is a triangular number, so we try 5; {5, 5 + 2, 5 + 2 + 2} are not triangular numbers, thus a(2) = 5.
		

Crossrefs

Cf. A000217, A030194 (partial sums), A332941, A360019.

Programs

  • Maple
    q:= proc(n) option remember; issqr(8*n+1) end:
    s:= proc(i, j) option remember; `if`(i>j, 0, a(j)+s(i, j-1)) end:
    a:= proc(n) option remember; local k; for k from 2 while
          ormap(q, [k+s(i, n-1)$i=0..n]) do od; k
        end: a(-1):=-1:
    seq(a(n), n=0..81);  # Alois P. Heinz, Jan 21 2023
  • Mathematica
    triQ[n_] := IntegerQ @ Sqrt[8*n + 1]; a[0] = 2; a[n_] := a[n] = Module[{k = 2, t = Accumulate @ Table[a[i], {i, n - 1, 0, -1}]}, While[triQ[k] || AnyTrue[t + k, triQ], k++]; k]; Array[a, 100, 0] (* Amiram Eldar, Jan 21 2023 *)

Extensions

More terms from Amiram Eldar, Jan 21 2023
Showing 1-5 of 5 results.