login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 2
1, 3, 8, 11, 25, 20, 40, 9, 45, 41, 158, 200, 14, 185, 636, 589, 595, 432, 773, 3196, 1249, 50, 7703, 7661, 12954, 25629, 14885, 41189, 23200, 87410, 33969, 63225, 20486, 212825, 58621, 152952, 135263, 2743830, 729008, 384150, 908629, 126746, 4543899, 3448777, 8531396 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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.

By the pigeonhole principle, a(n) has an upper bound of n^n.

The growth of a(n) appears to be roughly exponential.

LINKS

Elad Michael, Table of n, a(n) for n = 1..100 (terms 1..76 from Johan Westin)

Reddit user supermac30, Foggy Sequences

EXAMPLE

The sequence b(3, m) is 1, 1, 2, 1, 2, 2, 2, 3, 1, 1, 2, ... the period of which is 8.

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.

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.

MATHEMATICA

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 *)

PROG

(Python)

import sympy

def A334539(n):

  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

CROSSREFS

Sequence in context: A171672 A341262 A070073 * A058565 A170901 A201882

Adjacent sequences:  A334536 A334537 A334538 * A334540 A334541 A334542

KEYWORD

nonn,changed

AUTHOR

Mark Bedaywi, May 05 2020

EXTENSIONS

More terms from Giovanni Resta, May 06 2020

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 17:40 EDT 2021. Contains 343652 sequences. (Running on oeis4.)