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.

A368866 The smallest positive number such that 2^a(n) when written in base n contains adjacent equal digits.

This page as a plain text file.
%I A368866 #22 Jan 09 2024 10:30:28
%S A368866 2,2,4,5,6,3,6,12,16,14,11,15,8,4,8,23,16,14,16,21,9,17,20,14,30,27,
%T A368866 16,15,10,5,10,29,48,14,46,19,18,15,32,36,27,36,18,12,56,41,37,24,58,
%U A368866 22,26,46,58,40,29,24,36,14,20,18,12,6,12,60,62,50,49,50,20,35,36,55,61,52,53,77
%N A368866 The smallest positive number such that 2^a(n) when written in base n contains adjacent equal digits.
%C A368866 In the first 10000 terms the largest value is a(9031) = 1924, with a corresponding power of 2 of approximately 1.52*10^579.
%H A368866 Scott R. Shannon, <a href="/A368866/b368866.txt">Table of n, a(n) for n = 2..10000</a>
%e A368866 a(2) = 2 as 2^2 = 4 written in base 2 = 100_2 which contains adjacent 0's.
%e A368866 a(6) = 6 as 2^6 = 64 written in base 6 = 144_6 which contains adjacent 4's.
%e A368866 a(10) = 16 as 2^16 = 65536 written in base 10 = 65536_10 which contains adjacent 5's.
%p A368866 f:= proc(n) local k,L;
%p A368866   for k from 1 do
%p A368866     L:= convert(2^k,base,n);
%p A368866     if member(0, L[2..-1]-L[1..-2]) then return k fi
%p A368866   od
%p A368866 end proc:
%p A368866 map(f, [$2..100]); # _Robert Israel_, Jan 09 2024
%o A368866 (Python)
%o A368866 from itertools import count
%o A368866 from sympy.ntheory.factor_ import digits
%o A368866 def A368866(n):
%o A368866     k = 1
%o A368866     for m in count(1):
%o A368866         k <<= 1
%o A368866         s = digits(k,n)[1:]
%o A368866         if any(s[i]==s[i+1] for i in range(len(s)-1)):
%o A368866             return m # _Chai Wah Wu_, Jan 08 2024
%Y A368866 Cf. A000079, A171901, A011557, A004642, A004643, A000866.
%K A368866 nonn,base
%O A368866 2,1
%A A368866 _Scott R. Shannon_, Jan 08 2024