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

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

Showing 1-1 of 1 results.