A004644 Duplicate of A000866.
1, 2, 4, 13, 31, 112, 224, 1003, 2011, 4022, 13044, 31143, 112341, 230232, 1011014
Offset: 0
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.
a(2) = 2 as 2^2 = 4 written in base 2 = 100_2 which contains adjacent 0's. a(6) = 6 as 2^6 = 64 written in base 6 = 144_6 which contains adjacent 4's. a(10) = 16 as 2^16 = 65536 written in base 10 = 65536_10 which contains adjacent 5's.
f:= proc(n) local k,L; for k from 1 do L:= convert(2^k,base,n); if member(0, L[2..-1]-L[1..-2]) then return k fi od end proc: map(f, [$2..100]); # Robert Israel, Jan 09 2024
from itertools import count from sympy.ntheory.factor_ import digits def A368866(n): k = 1 for m in count(1): k <<= 1 s = digits(k,n)[1:] if any(s[i]==s[i+1] for i in range(len(s)-1)): return m # Chai Wah Wu, Jan 08 2024
a(19) = 4 because 2^20 = 1048576 = 232023301 (to scale 5) and (2+3+2+0+2+3+3+0+1)/4 = 4.
a[n_] := 1/4* Module[{aux = IntegerDigits[2^n, 5]},Sum[aux[[i]], {i, 1, Length[aux]}]]; Table[a[n], {n, 2, 83}] (* José María Grau Ribas, Feb 13 2010 *)
FromDigits[IntegerDigits[#,5]]&/@(10^Range[0,20]) (* Harvey P. Dale, Feb 03 2019 *)
a(10) = 16 because 2^16 = 65536 does not have all distinct digits in base 10, while 2^k does have all distinct digits for 1 <= k <= 15.
f:= proc(n) local k,L; for k from 2 do L:= convert(2^k,base,n); if nops(L) <> nops(convert(L,set)) then return k fi od; end proc: map(f, [$2..100]);
from itertools import count from sympy.ntheory import digits def a(n): return next(k for k in count(2) if len(set(d:=digits(1<Michael S. Branicky, Jul 05 2023
a(10) = 29 because all decimal digits of 2^29 = 536870912 are distinct.
f:= proc(b) local M,k,L; M:= b^b - (b^b-b)/(b-1)^2; for k from ilog2(M) to 1 by -1 do L:= convert(2^k,base,b); if nops(L) = nops(convert(L,set)) then return k fi od end proc: map(f, [$2..100]);
from sympy.ntheory.factor_ import digits def A364089(n): m = 1<<(l:=((r:=n**n)-(r-n)//(n-1)**2).bit_length()-1) while len(d:=digits(m,n)[1:]) > len(set(d)): l -= 1 m >>= 1 return l # Chai Wah Wu, Jul 07 2023
Comments