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.

A385114 a(n) is the least k with k > a(n-1) such that A000120(k) = A002487(n), with a(0) = 0.

This page as a plain text file.
%I A385114 #39 Jul 16 2025 20:53:19
%S A385114 0,1,2,3,4,7,9,11,16,23,25,31,33,47,49,51,64,79,83,127,131,255,271,
%T A385114 319,320,351,355,383,385,415,417,419,512,543,551,767,771,2047,2111,
%U A385114 2559,2561,3071,3135,8191,8207,10239,10271,10367,12288,12415,12431,13311,13315,14335
%N A385114 a(n) is the least k with k > a(n-1) such that A000120(k) = A002487(n), with a(0) = 0.
%H A385114 Karl-Heinz Hofmann, <a href="/A385114/b385114.txt">Table of n, a(n) for n = 0..10000</a>. (Terms 0..293 from Hugo Pfoertner.)
%H A385114 Karl-Heinz Hofmann, <a href="/A385114/a385114.txt">Python code.</a>
%H A385114 Michael De Vlieger, <a href="/A385114/a385114.png">Plot the i-th bit of a(n) at (x,y) = (n,i)</a>, n = 1..2^11, reading bits from the least significant to the most.
%H A385114 Karl-Heinz Hofmann, <a href="/A385114/a385114_1.png">Vertical visualization of terms in binary</a>, reading bits from the most significant to the least.
%F A385114 a(A212288(n)) >= 2^A212289(n+1) - 1. - _Hugo Pfoertner_, Jul 15 2025
%e A385114   n |  a(n)_2   a(n)   A002487(n)
%e A385114 ----+-----------------------------
%e A385114   0 |       0     0       0
%e A385114   1 |       1     1       1
%e A385114   2 |      10     2       1
%e A385114   3 |      11     3       2
%e A385114   4 |     100     4       1
%e A385114   5 |     111     7       3
%e A385114   6 |    1001     9       2
%e A385114   7 |    1011    11       3
%e A385114   8 |   10000    16       1
%e A385114   9 |   10111    23       4
%e A385114  10 |   11001    25       3
%e A385114  11 |   11111    31       5
%e A385114  12 |  100001    33       2
%e A385114  13 |  101111    47       5
%e A385114  14 |  110001    49       3
%t A385114 k = s[0] = 0; s[1] = 1; s[n_] := s[n] = If[EvenQ[n], s[n/2], s[(n - 1)/2] + s[(n + 1)/2]]; Array[s, 2^10]; {k}~Join~Monitor[Table[Set[k, Max[k + 1, 2^s[n] - 1]]; While[DigitCount[k, 2, 1] != s[n], k++]; k, {n, 100}], n] (* _Michael De Vlieger_, Jul 14 2025 *)
%o A385114 (PARI) lista(nn) = my(list = List([0]), last = 0); for (n=1, nn, my(k=last+1, d=dia(n)); while (hammingweight(k) != d, k++); last = k; listput(list, k);); Vec(list); \\ _Michel Marcus_, Jul 12 2025
%o A385114 (Python) # see links
%Y A385114 Cf. A000120, A002487, A101624, A168081, A277020.
%Y A385114 Cf. A212288, A212289.
%K A385114 nonn,base
%O A385114 0,3
%A A385114 _Karl-Heinz Hofmann_, Jun 18 2025