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

A362909 a(n) is the smallest number k such that A362881(k) = n.

Original entry on oeis.org

1, 3, 6, 10, 22, 31, 34, 37, 40, 121, 1035, 1078, 1121, 7607, 9453, 13667, 13729, 50040, 50123, 50206, 615964, 616448, 616932, 617416, 2828280, 2851232, 2874184, 2897136, 5350614, 5583250, 5594326, 17310256, 17312210, 17994974, 18008820, 19051432, 19069162
Offset: 1

Views

Author

Samuel Harkness, May 14 2023

Keywords

Comments

All positive integers will appear in A362881. Rémy Sigrist showed that as a consequence of Van der Waerden's theorem, A362881 is unbounded.
The present sequence is monotonically increasing since a progression of length n begins with a progression of length n-1 so a(n-1) < a(n).

Crossrefs

Cf. A362881.

Programs

  • C
    /* See links */
  • MATLAB
    See Links section.
    

Extensions

a(25)-a(31) from Yang Haoran, May 17 2023
a(32)-a(37) from Kevin Ryde, May 22 2023

A368290 a(n) is the length of the longest palindromic subsequence at symmetrically-spaced indices ending at a(n-1); a(1)=1.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Dec 19 2023

Keywords

Comments

A set of indices is symmetric if, listed in increasing or decreasing order, its first differences are a palindromic sequence.
A new value is always followed by 1.
An alternate definition: a(n) is the largest number of coincidences between the subsequence enclosed by m..n-1 and its reverse, where a(n-1)=a(m), maximized over m.

Examples

			a(10)=5 because we find the following length-5 palindromic subsequence at symmetric indices ending at i=a(n-1)=a(9)=2:
  S: 1,1,2,1,3,1,3,3,2
  P:     2,  3,1,3,  2
a(14)=6 because of the following length-6 palindromic subsequence:
  S: 1,1,2,1,3,1,3,3,2,5,1,7,1
  P:   1,  1,    3,3,    1,  1
		

Crossrefs

Programs

  • PARI
    { for (n = 1, #a = vector(83, n, 1), for (k = 1, n-1, if (a[k] == a[n-1], a[n] = max(a[n], sum (i = k, n-1, a[i] == a[n-1+k-i]);););); print1 (a[n]", ");); } \\ Rémy Sigrist, Dec 20 2023

Extensions

More terms from Rémy Sigrist, Dec 20 2023

A382559 a(n) is the length of the longest subsequence at indices in arithmetic progression ending at a(n-1) whose terms form an arithmetic progression in some order; a(1)=1.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Apr 01 2025

Keywords

Comments

First differs from A362881 at a(15).
This is a variant of A362881 in which the terms of an arithmetic progression can occur in any order.

Examples

			a(21) = 4: The subsequence at indices i = 2,8,14,20 (common difference 6) is {1,3,2,4} which can be rearranged to form the arithmetic progression {1,2,3,4}. We find that the longest such subsequence ending at a(20) has length 4, so a(21) = 4.
		

Crossrefs

A384450 a(1) = 0; thereafter, a(n) is the number of arithmetic progressions of length 3 or greater at indices in an arithmetic progression ending at a(n-1).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 0, 4, 0, 5, 0, 8, 0, 9, 0, 12, 1, 0, 1, 0, 0, 5, 0, 5, 0, 5, 1, 0, 3, 0, 3, 0, 4, 0, 2, 2, 2, 2, 3, 0, 3, 0, 2, 1, 0, 7, 0, 5, 0, 5, 0, 7, 0, 10, 1, 1, 2, 1, 1, 0, 9, 0, 6, 3, 0, 6, 1, 0, 6, 3, 3, 1, 2, 2, 3, 0, 7, 0, 6, 3, 1, 0, 4, 4
Offset: 1

Views

Author

Neal Gersh Tolunsky, May 27 2025

Keywords

Comments

In other words, take the longest arithmetic progression at indices with common difference k ending at a(n-1) and call that length j. a(n) is the sum of each j-2 that corresponds to a distinct common difference k. This means that an arithmetic progression of length 3 is worth 1 point, length 4 is worth 2 points, and so on.

Examples

			To find a(10), we see that there are 4 arithmetic progressions ending in a(9) = 0. These occur at indices i = 5,7,9; i = 3,5,7,9; i = 1,3,5,7,9; and i = 1,5,9. So a(10) = 4.
		

Crossrefs

Extensions

a(32)-a(86) from Pontus von Brömssen, May 30 2025
Showing 1-4 of 4 results.