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

A336531 A sieve: start with the positive integers. Let a(1)=1. Mark out the following numbers: a(1)+1, a(1)+1+2, a(1)+1+2+3, a(1)+1+2+3+4, ... . The next integer in the list not marked out is 3, so a(2)=3. Mark out the following numbers: a(2)+1, a(2)+1+2, a(2)+1+2+3, a(2)+1+2+3+4, ... . Repeat the procedure for a(3), a(4), a(5), ... .

Original entry on oeis.org

1, 3, 5, 10, 12, 14, 19, 21, 23, 28, 30, 32, 52, 54, 61, 63, 70, 72, 86, 95, 102, 104, 111, 113, 142, 144, 151, 153, 160, 162, 169, 171, 212, 221, 230, 246, 268, 270, 293, 300, 302, 309, 311, 318, 320, 327, 349, 358, 360
Offset: 1

Views

Author

Lechoslaw Ratajczak, Oct 04 2020

Keywords

Comments

Are there infinitely many pairs of the form (a(n), a(n)+2)? Let b(m) be the number of pairs less than m that differ by 2, and let s be the sum of reciprocals of consecutive terms of these pairs:
---------------------
m | b(m)| s
---------------------
10^2 | 11 | 2.627931
10^3 | 34 | 2.788503
10^4 | 64 | 2.807758
10^5 | 95 | 2.809793
10^6 | 151 | 2.810210
10^7 | 241 | 2.810273
10^8 | 386 | 2.810284
---------------------
Does the sum of these reciprocals ((1/1 + 1/3) +(1/3 + 1/5) + (1/10 + 1/12) + (1/12 + 1/14) + (1/19 + 1/21) + ...) converge to a finite number?

Examples

			The first few sieving stages are as follows:
1 2 3 4  5 6  7 8 9 10 11  12 13  14 15  16 17 18 19 20   21 22   23 ...
1 X 3 X  5 6  X 8 9 10 X   12 13  14 15  X  17 18 19 20   21 X    23 ...
1 X 3 XX 5 X  X 8 X 10 X   12 X   14 15  X  17 X  19 20   21 X    23 ...
1 X 3 XX 5 XX X X X 10 XX  12 X   14 X   X  17 X  19 X    21 X    23 ...
1 X 3 XX 5 XX X X X 10 XXX 12 XX  14 X   XX 17 X  19 XX   21 X    23 ...
1 X 3 XX 5 XX X X X 10 XXX 12 XXX 14 XX  XX 17 XX 19 XX   21 XX   23 ...
1 X 3 XX 5 XX X X X 10 XXX 12 XXX 14 XXX XX X  XX 19 XXX  21 XX   23 ...
1 X 3 XX 5 XX X X X 10 XXX 12 XXX 14 XXX XX X  XX 19 XXXX 21 XXX  23 ...
1 X 3 XX 5 XX X X X 10 XXX 12 XXX 14 XXX XX X  XX 19 XXXX 21 XXXX 23 ...
... Continue forever and the numbers not crossed off give the sequence.
		

Crossrefs

Formula

a(n) = A030194(n-1) + 1. - Hugo Pfoertner, Oct 05 2020

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