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.

A330015 a(0) = 0; for n > 0, a(n) is the number of distinct digit strings that occur at least twice (including any overlapping occurrences) in the concatenation of all previous terms.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 12, 14, 14, 15, 17, 17, 18, 20, 20, 21, 24, 24, 25, 27, 27, 28, 30, 30, 31, 33, 34, 36, 36, 37, 39, 39, 40, 40, 41, 43, 45, 46, 46, 47, 49, 49, 51, 52, 54, 56, 57, 57, 58, 60, 60, 61, 63, 63, 65, 67, 68, 68, 70, 70, 71, 73, 75
Offset: 0

Views

Author

Scott R. Shannon, Nov 27 2019

Keywords

Comments

To calculate a(n) take all the terms from a(0) to a(n-1), concatenate them, and then count the distinct digit strings that have at least two occurrences (including any that overlap). For example, if the concatenated terms formed the string '2210102240404' then the next term would be 9 as the strings '0','1','2','4','04','10','22','40','404' have all occurred at least twice. (The two occurrences of '404' overlap.)
In the first 20000 terms, the largest increase in consecutive terms is from a(13058) = 47849 to a(13059) = 47885, an increase of 36, and the concatenation of a(13006) = 47623 to the previous terms results in the longest repeated string, '47611476114761147'.

Examples

			a(1) = 0 as there have been no repeated strings prior to a(1).
a(2) = 1 as there has been one repeat of '0', which occurs in a(0) and a(1).
a(3) = 1 as only '0' has repeated up to a(2).
a(4) = 2 as now both '0' and '1' have repeated up to a(3).
a(22) = 12 as the strings '0' to '10' have repeated, but '10,10' contains the string '01' which also appears from a(1) to a(2), thus '01' has also repeated.
a(23) = 14 as a(22) = '12' created a repeat of the string '12', with a(3) and a(4), and also created an overlapping repeat of the string '101' which is in both '10,10' and '10,12'. Note this later string also contains '01' but that has already repeated and been counted previously so is ignored as the count is of distinct strings.
		

Crossrefs

Cf. A327036 (same sequence, but overlapping instances of the same digit string are not counted among the repeats).