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.

A165617 a(n) is the number of positive integers k such that k is equal to the number of 1's in the digits of the base-n expansion of all positive integers <= k.

This page as a plain text file.
%I A165617 #42 Aug 10 2023 02:10:54
%S A165617 2,4,8,4,21,5,45,49,83,10,269,11,202,412,479,15,1108,15,1545,1219,
%T A165617 1343,21,8944,706,1043,5077,4084,28,27589,27,32160,10423,6689
%N A165617 a(n) is the number of positive integers k such that k is equal to the number of 1's in the digits of the base-n expansion of all positive integers <= k.
%C A165617 The greatest number counted by a(n) is 1...10, where the number of 1's is n-1. - Martin J. Erickson (erickson(AT)truman.edu), Oct 08 2010
%C A165617 These numbers, described in previous comment, 10(2), 110(3), 1110(4), ... expressed in base 10 are: 2, 12, 84, 780, 9330, 137256, 2396744, 48427560, 1111111110, ... - _Michel Marcus_, Aug 20 2013
%C A165617 The sequence described in the previous two comments is A226238. - _Ralf Stephan_, Aug 25 2013
%H A165617 Tanya Khovanova and Gregory Marton, <a href="https://arxiv.org/abs/2305.10357">Archive Labeling Sequences</a>, arXiv:2305.10357 [math.HO], 2023. See p. 9.
%e A165617 a(3)=4 since there are four values of k such that k is equal to the number of 1's in the digits of the base-3 expansion of all numbers <= k, namely, 1, 4, 5, 12.
%e A165617 From _Jon E. Schoenfield_, Apr 23 2023: (Start)
%e A165617 In the table below, an asterisk appears on each row k at which the cumulative count of 1's in the base-3 expansion of the positive integers 1..k is equal to k:
%e A165617 .
%e A165617        k      #1's  cume
%e A165617   ----------  ----  ----
%e A165617    1 =   1_3    1     1*
%e A165617    2 =   2_3    0     1
%e A165617    3 =  10_3    1     2
%e A165617    4 =  11_3    2     4*
%e A165617    5 =  12_3    1     5*
%e A165617    6 =  20_3    0     5
%e A165617    7 =  21_3    1     6
%e A165617    8 =  22_3    0     6
%e A165617    9 = 100_3    1     7
%e A165617   10 = 101_3    2     9
%e A165617   11 = 102_3    1    10
%e A165617   12 = 110_3    2    12*
%e A165617 (End)
%t A165617 nn = 7; Table[c = q = 0; Do[c += DigitCount[i, n, 1]; If[c == i, q++], {i, (#^# - #)/(# - 1) &[n]}]; q, {n, 2, nn}] (* _Michael De Vlieger_, May 24 2023 *)
%o A165617 (PARI) a(n) = {my(nmax = (n^n - 1)/(n - 1) - 1, s = 0, nb = 0); for (i=1, nmax, my(digs = digits(i, n)); s += sum (k=1, #digs, (digs[k] == 1)); if (s == i, nb++);); nb;} \\ _Michel Marcus_, Aug 20 2013; corrected Apr 23 2023
%Y A165617 Cf. A014778, A226238.
%K A165617 nonn,base,more
%O A165617 2,1
%A A165617 Martin J. Erickson (erickson(AT)truman.edu), Sep 22 2009
%E A165617 Example corrected by Martin J. Erickson (erickson(AT)truman.edu), Sep 25 2009
%E A165617 Definition and a(10) corrected by _Tanya Khovanova_, Apr 23 2023
%E A165617 a(11)-a(35) from _Gregory Marton_, Jul 29 2023