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.

A365215 Largest k such that the binary representation of 3^k has exactly n 1's, or -1 if no such k exists.

This page as a plain text file.
%I A365215 #13 Aug 27 2023 10:13:56
%S A365215 0,2,4,3,7,8,-1,9,10,12,16,-1,11,18,15,24,20,25,22,21,-1,23
%N A365215 Largest k such that the binary representation of 3^k has exactly n 1's, or -1 if no such k exists.
%C A365215 Largest k such that A011754(k) = n, or -1 if no such k exists.
%C A365215 Senge and Straus prove that a(n) is finite for all n.
%C A365215 The first 22 terms are from Dimitrov and Howe (2021). After a(22), the sequence conjecturally but very likely continues -1, 26, 30, 32, 36, 40, 34, 27, -1, 39, 49, 45, 53, 38, -1, 47, 56, 57, 50, 58, -1, -1, 66, 51, 67, 59, 62, -1, ... .
%H A365215 Vassil S. Dimitrov and Everett W. Howe, <a href="https://arxiv.org/abs/2105.06440">Powers of 3 with few nonzero bits and a conjecture of Erdős</a>, arXiv:2105.06440 [math.NT], 2021.
%H A365215 H. G. Senge and E. G. Straus, <a href="https://doi.org/10.1007/BF02018464">PV-numbers and sets of multiplicity</a>, Periodica Mathematica Hungarica 3 (1973), 93-100.
%t A365215 LargestK[n_Integer] := Module[{k = 1000(*Assuming 1000 is large enough for the search.  Adjust if necessary.*), binCount}, While[k >= 0, binCount = Total[IntegerDigits[3^k, 2]]; If[binCount == n, Return[k]]; k--;]; -1]; Table[LargestK[n], {n, 22}] (* _Robert P. P. McKone_, Aug 26 2023 *)
%Y A365215 Cf. A011754, A364650, A365214.
%K A365215 sign,base,more
%O A365215 1,2
%A A365215 _Pontus von Brömssen_, Aug 26 2023