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.
%I A088935 #28 Dec 26 2022 09:47:27 %S A088935 0,5,15,78,88,98,108,118,181,191,201,211,274,284,294,304,367,377,387, %T A088935 397,407,470,480,490,500,563,573,583,593,603,666,676,686,696,759,769, %U A088935 779,789,852,862,872,882,892,955,965,975,985,1048,1058,1068,1078,1088 %N A088935 Numbers n such that leading digits of 2^n and 5^n are equal. %C A088935 Write lg = log_10, let {x} denote the fractional part of x. Note that {k*lg(5)} = 1 - {k*lg(2)}, so we have {k > 0 : 2^k, 5^k, 8^k all start with a} = {k: {k*lg(2)} is in I_a}, where I_a = (lg(a), lg(a+1)) intersect (1-lg(a+1), 1-lg(a)). Note that I_3 = (lg(3), 1-lg(3)) and I_a is empty otherwise. As a result, k > 0 is a term if and only if lg(3) < {k*lg(2)} < 1-lg(3). - _Jianing Song_, Dec 26 2022 %H A088935 David A. Corneth, <a href="/A088935/b088935.txt">Table of n, a(n) for n = 1..10000</a> %H A088935 T. Sillke, <a href="http://www.mathematik.uni-bielefeld.de/~sillke/PUZZLES/powers-2-5">Powers of 2 and 5 Puzzle</a> %e A088935 78 is in the sequence since 2^78 = 302231454903657293676544 and 5^78 = 3308722450212110699485634768279851414263248443603515625 %e A088935 98 is in the sequence since 2^98 = 316912650057057350374175801344 and 5^98 = 315544362088404722164691426113114491869282574043609201908111572265625. %p A088935 filter:= n -> convert(2^n,base,10)[-1]=convert(5^n,base,10)[-1]: %p A088935 select(filter, [$0..1000]); # _Robert Israel_, Aug 09 2018 %t A088935 Select[ Range[ 1000 ], IntegerDigits[ 2^# ][ [ 1 ] ] == IntegerDigits[ 5^# ][ [ 1 ] ] & ] %o A088935 (PARI) is(n)=(digits(2^n)[1]==digits(5^n)[1]); %o A088935 for(n=0,10^3,if(is(n),print1(n,", "))); \\ _Joerg Arndt_, Aug 10 2018 %o A088935 (Python) %o A088935 def ok(n): return str(2**n)[0] == str(5**n)[0] %o A088935 print([k for k in range(1100) if ok(k)]) # _Michael S. Branicky_, Nov 03 2022 %Y A088935 Cf. A088995. %K A088935 base,nonn %O A088935 1,2 %A A088935 _Lekraj Beedassy_, Dec 01 2003 %E A088935 Edited by _Robert G. Wilson v_, Dec 02 2003