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.

A350768 a(1)=1. Thereafter, if a(n) is a term that has appeared exactly k times prior to and including itself then a(n+1) is the number of terms prior to and including a(n) which have appeared exactly k times.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 6, 2, 4, 3, 2, 5, 3, 6, 2, 6, 9, 3, 4, 2, 7, 3, 5, 4, 9, 4, 4, 10, 2, 8, 3, 6, 4, 12, 4, 7, 6, 5, 6, 12, 6, 14, 3, 21, 4, 16, 5, 4, 9, 6, 16, 6, 18, 5, 5, 6, 10, 8, 10, 9, 4, 20, 4, 11, 5, 14, 10, 8, 6, 22, 5, 16, 9, 5, 9, 6, 12, 12, 8, 12
Offset: 1

Views

Author

David James Sycamore, Jan 14 2022

Keywords

Comments

In other words: If a(n) has appeared k>=1 times, and there are m>=1 other numbers which (prior to a(n)) have also appeared k times, then a(n+1)=k*m.
Conjecture: Every positive integer appears finitely many times (1 appears three times, 2 eight times, 3 seven times, and so on). It seems that after a number j has appeared for the final time in the sequence, it remains possible for subsequent terms to appear j times, but not in isolation, meaning that there are g>1 other numbers which have also appeared j times, so that the next term becomes j*m, rather than j. Henceforth j cannot appear again, but multiples of j can, until they too cease to appear.
Let c(m) represent the number of times m appears in a(1..n) and q(w) the number of c(m) = w. Therefore the sequence may be defined alternatively as a(1) = 1; a(n) = q(c(a(n)))*c(a(n)). - Michael De Vlieger, Jan 14 2022

Examples

			a(1)=1 is a first occurrence, so a(2) is the number of first occurrences prior to and including a(1), thus a(2)=1. a(2) is a term seen twice and no other term has been seen twice, so a(3)=2. Since a(3)=2 is a novel term, a(4)=1, the number of terms seen exactly once so far.
		

Crossrefs

Cf. A000027.

Programs

  • Mathematica
    Block[{c, j, k, q, u, nn}, c[] = q[] = 0; j = c[j] = 1; {j}~Join~Reap[Do[Set[k, c[j]]; q[k]++; q[k - 1]--; k = k*q[k]; Sow[k]; c[k]++; j = k, {i, 2, 120}] ][[-1, -1]] ] (* Michael De Vlieger, Jan 14 2022 *)
  • PARI
    lista(nn) = {my(list=List(1), k, kk); for (n=2, nn, k = #select(x->(x==list[n-1]), list); kk = sum(i=1, #list, #select(x->(x==list[i]), list) == k); listput(list, kk); ); Vec(list);} \\ Michel Marcus, Jan 15 2022

Extensions

More terms from Michael De Vlieger, Jan 14 2022