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.

A381900 Sequence where k is appended after every (2^(k-1))*k occurrences of 1, with multiple values following a 1 listed in order.

This page as a plain text file.
%I A381900 #13 May 25 2025 09:22:31
%S A381900 1,1,1,1,2,1,1,1,1,2,1,1,1,1,2,3,1,1,1,1,2,1,1,1,1,2,1,1,1,1,2,3,1,1,
%T A381900 1,1,2,1,1,1,1,2,4,1,1,1,1,2,3,1,1,1,1,2,1,1,1,1,2,1,1,1,1,2,3,1,1,1,
%U A381900 1,2,1,1,1,1,2,1,1,1,1,2,3,1,1,1,1,2,4,1,1,1,1,2,1,1,1,1,2,3,1,1,1,1,2,1,1,1,1,2,5
%N A381900 Sequence where k is appended after every (2^(k-1))*k occurrences of 1, with multiple values following a 1 listed in order.
%C A381900 The frequencies of the terms follow the logarithmic distribution with parameter value 1/2.
%C A381900 The geometric mean approaches A381898 in the limit.
%H A381900 Jwalin Bhatt, <a href="/A381900/b381900.txt">Table of n, a(n) for n = 1..10000</a>
%H A381900 Wikipedia, <a href="https://en.wikipedia.org/wiki/Logarithmic_distribution">Logarithmic distribution</a>
%e A381900 After every (2*2=4) ones we see a 2,
%e A381900 after every (4*3=12) ones we see a 3,
%e A381900 after every (8*4=32) ones we see a 4 and so on.
%o A381900 (Python)
%o A381900 from itertools import islice
%o A381900 def logarithmic_distribution_generator():
%o A381900     num_ones, num_reached = 0, 1
%o A381900     while num_ones := num_ones+1:
%o A381900         yield 1
%o A381900         for num in range(2, num_reached+2):
%o A381900             if num_ones % ((2**(num-1))*(num)) == 0:
%o A381900                 yield num
%o A381900                 num_reached += num == num_reached+1
%o A381900 A381900 = list(islice(logarithmic_distribution_generator(), 120))
%Y A381900 Cf. A381522, A381898.
%K A381900 nonn
%O A381900 1,5
%A A381900 _Jwalin Bhatt_, Mar 09 2025