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.

This page as a plain text file.
%I A350768 #30 Jul 01 2025 23:01:43
%S A350768 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,
%T A350768 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,
%U A350768 4,11,5,14,10,8,6,22,5,16,9,5,9,6,12,12,8,12
%N 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.
%C A350768 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.
%C A350768 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.
%C A350768 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
%H A350768 Neal Gersh Tolunsky, <a href="/A350768/b350768.txt">Table of n, a(n) for n = 1..10000</a>
%H A350768 Michael De Vlieger, <a href="/A350768/a350768.png">Scatterplot of a(n)</a>, n = 1..2^20.
%H A350768 Michael De Vlieger, <a href="/A350768/a350768_1.png">Log-log scatterplot of a(n)</a>, n = 1..2^12. Records are annotated in red, last occurrence of m appears in blue, and we highlight the first appearance of m in gold, second in green, and third in cyan. This is an attempt to explain striations in large-scale scatterplots.
%H A350768 Michael De Vlieger, <a href="/A350768/a350768_2.png">Log-log scatterplot of a(n)</a>, n = 1..2^12, using a spectral color function where red corresponds to the lowest values of c(m), and blue-magenta the highest values of c(m). As expected, as n increases, m appears increasingly often, however, some m appear more often than others.
%H A350768 Michael De Vlieger, <a href="/A350768/a350768_3.png">Log-log scatterplot of a(n)</a>, n = 1..2^12, using a spectral color function where red corresponds to the lowest values of q(m), and blue-magenta the highest values of q(m). Generally, small m have a lower frequency q(m) than do higher m, but the gradient is impure.
%H A350768 Kevin Ryde, <a href="/A350768/a350768.gp.txt">PARI/GP Code</a>
%e A350768 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.
%t A350768 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 *)
%o A350768 (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
%Y A350768 Cf. A000027.
%K A350768 nonn
%O A350768 1,3
%A A350768 _David James Sycamore_, Jan 14 2022
%E A350768 More terms from _Michael De Vlieger_, Jan 14 2022