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.

Previous Showing 11-14 of 14 results.

A361172 a(n) is the smallest positive number not among the terms between a(n-1) and the previous most recent occurrence of a(n-1) inclusive; if a(n-1) is a first occurrence, set a(n)=1; a(1)=1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 4, 1, 3, 5, 1, 2, 6, 1, 3, 4, 7, 1, 2, 5, 8, 1, 3, 6, 9, 1, 2, 4, 10, 1, 3, 5, 7, 11, 1, 2, 6, 8, 12, 1, 3, 4, 9, 13, 1, 2, 5, 10, 14, 1, 3, 6, 7, 15, 1, 2, 4, 8, 11, 16, 1, 3, 5, 9, 12, 17, 1, 2, 6, 10, 13, 18, 1, 3, 4, 7, 14, 19, 1, 2, 5, 8, 15, 20, 1
Offset: 1

Views

Author

Neal Gersh Tolunsky, Mar 02 2023

Keywords

Comments

The terms between two adjacent 1s must be strictly increasing.
The index of first occurrences appears to be A060432 (partial sums of A002024).

Examples

			a(11)=5 because between a(10)=3 and the previous 3 (3, 1, 2, 4, 1, 3), the smallest missing number is 5, so a(11)=5.
		

Crossrefs

Programs

  • PARI
    { pos = [0]; v = 1; for (n = 1, #a = vector(86), print1 (a[n] = v", "); v = 1; if (a[n] <= #pos && pos[a[n]], r = Set(a[pos[a[n]]..n]); while (setsearch(r, v), v++)); while (#pos < a[n], pos = concat(pos, vector(#pos));); pos[a[n]] = n;); } \\ Rémy Sigrist, Mar 04 2023

A214651 Count down from n to 1, n times.

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 24 2012

Keywords

Comments

This sequence contains every positive integer infinitely often.
This is a fractal sequence. Striking out the first instance of every term produces 1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, ..., which is the same as the original sequence, as far as it goes.

Examples

			1;
2, 1, 2, 1;
3, 2, 1, 3, 2, 1, 3, 2, 1;
...
		

Crossrefs

Cf. A056520 (locations of new values), A060432 (locations of 1's).
Cf. A000290 (row lengths), A002411 (row sums), A036740 (row products).

Programs

  • Mathematica
    f[n_] := Table[Range[n, 1, -1], {n}]; Flatten@Array[f, 6] (* Wesolowski *)
    Flatten[Table[Table[Range[n, 1, -1], {n}], {n, 6}]] (* Alonso del Arte, Jul 24 2012 *)

A329598 Partial sums of the nontriangular numbers (A014132).

Original entry on oeis.org

2, 6, 11, 18, 26, 35, 46, 58, 71, 85, 101, 118, 136, 155, 175, 197, 220, 244, 269, 295, 322, 351, 381, 412, 444, 477, 511, 546, 583, 621, 660, 700, 741, 783, 826, 870, 916, 963, 1011, 1060, 1110, 1161, 1213, 1266, 1320, 1376, 1433, 1491, 1550, 1610, 1671, 1733
Offset: 1

Views

Author

Keywords

Comments

Terms which are triangular: 6, 136, 351, 741, 2415, 3916, 5995, 12561, 17391, 23436, ..., .

Examples

			The nontriangular numbers begin 2, 4, 5, 7, ..., so their partial sums begin 2, 6, 11, 18, etc.
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 64.

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ @ Sqrt[8n + 1]; Accumulate@ Select[ Range@ 70, !triQ@# &]
  • Python
    from math import isqrt
    def A329598(n): return (k:=(r:=isqrt(m:=n+1<<1))+int((m<<2)>(r<<2)*(r+1)+1)-1)*(k*(-k - 3) + 6*n - 2)//6 + (n*(n+3)>>1) # Chai Wah Wu, Jun 18 2024

Formula

a(n) = Sum_{i=1..n} A014132(i).
a(n) = A000217(n) + A060432(n). [corrected by Gerald Hillier, Jul 31 2022]

A256619 Numbers n such that there are no primes in the interval [b(n), b(n+1) - 1], where b(n) = 1 + Sum_{k=1..n} floor(1/2 + sqrt(2*k - 2)).

Original entry on oeis.org

1, 26, 29, 38, 47, 97, 114, 127, 216, 276, 433, 1094, 1284
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 05 2015

Keywords

Comments

Numbers n such that there are no primes in the interval [A075349(n), A060432(n)].
Conjecture: the sequence is finite and complete.

Examples

			1st row:  {1}              - no prime!
2nd row:  {2, 3}           - two primes (2 and 3).
3rd row:  {4, 5}           - one prime (5).
4th row:  {6, 7, 8}        - one prime (7).
5th row:  {9, 10, 11}      - one prime (11).
6th row:  {12, 13, 14}     - one prime (13).
7th row:  {15, 16, 17, 18} - one prime (17).
8th row:  {19, 20, 21, 22} - one prime (19).
9th row:  {23, 24, 25, 26} - one prime (23).
10th row: {27, 28, 29, 30} - one prime (29).
...
26th row: {120, 121, 122, 123, 124, 125, 126} - no primes!
...
29th row: {141, 142, 143, 144, 145, 146, 147, 148} - no primes!
...
		

Programs

  • Magma
    lst:=[]; k:=1284; b:=1; e:=0; for n in [1..k] do b:=b+Floor(1/2+Sqrt(2*n-2)); e:=e+Floor(1/2+Sqrt(2*n)); if IsZero(#[m: m in [b..e] | IsPrime(m)]) then Append(~lst, n); end if; end for; lst;
Previous Showing 11-14 of 14 results.