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.

A334539 The eventual period of a sequence b(n, m) where b(n, 1) = 1 and the m-th term is the number of occurrences of b(n, m-1) in the list of integers from b(n, max(m-n, 1)) to b(n, m-1).

This page as a plain text file.
%I A334539 #52 May 05 2021 17:25:43
%S A334539 1,3,8,11,25,20,40,9,45,41,158,200,14,185,636,589,595,432,773,3196,
%T A334539 1249,50,7703,7661,12954,25629,14885,41189,23200,87410,33969,63225,
%U A334539 20486,212825,58621,152952,135263,2743830,729008,384150,908629,126746,4543899,3448777,8531396
%N A334539 The eventual period of a sequence b(n, m) where b(n, 1) = 1 and the m-th term is the number of occurrences of b(n, m-1) in the list of integers from b(n, max(m-n, 1)) to b(n, m-1).
%C A334539 To generate the sequence b(n, m) for some n, start with the value 1 and then repeatedly append the number of times the last element of the sequence appears in the previous n terms. b(n, m) eventually becomes periodic for all n.
%C A334539 By the pigeonhole principle, a(n) has an upper bound of n^n.
%C A334539 The growth of a(n) appears to be roughly exponential.
%H A334539 Elad Michael, <a href="/A334539/b334539.txt">Table of n, a(n) for n = 1..100</a> (terms 1..76 from Johan Westin)
%H A334539 Reddit user supermac30, <a href="https://redd.it/gdsjth">Foggy Sequences</a>
%e A334539 The sequence b(3, m) is 1, 1, 2, 1, 2, 2, 2, 3, 1, 1, 2, ... the period of which is 8.
%e A334539 The sequence b(4, m) is 1, 1, 2, 1, 3, 1, 2, 1, 2, 2, 3, 1, 1, 2, ... the period of which is 11.
%e A334539 The sequence b(5, m) is 1, 1, 2, 1, 3, 1, 3, 2, 1, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 3, 2, 3, 3, 3, 4, 1, 1, 2, ... the period of which is 25.
%t A334539 a[k_] := Block[{b = Append[0 Range@k, 1], A=<||>, n=0}, While[True, n++; b = Rest@ b; AppendTo[b, Count[b, b[[-1]]]]; If[ KeyExistsQ[A, b], Break[]]; A[b] = n]; n - A[b]]; Array[a, 30] (* _Giovanni Resta_, May 06 2020 *)
%o A334539 (Python)
%o A334539 import sympy
%o A334539 def A334539(n):
%o A334539   return next(sympy.cycle_length(lambda x:x[1:]+(x.count(x[-1]),),(0,)*(n-1)+(1,)))[0] # _Pontus von Brömssen_, May 05 2021
%K A334539 nonn
%O A334539 1,2
%A A334539 _Mark Bedaywi_, May 05 2020
%E A334539 More terms from _Giovanni Resta_, May 06 2020