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.

Showing 1-3 of 3 results.

A088935 Numbers n such that leading digits of 2^n and 5^n are equal.

Original entry on oeis.org

0, 5, 15, 78, 88, 98, 108, 118, 181, 191, 201, 211, 274, 284, 294, 304, 367, 377, 387, 397, 407, 470, 480, 490, 500, 563, 573, 583, 593, 603, 666, 676, 686, 696, 759, 769, 779, 789, 852, 862, 872, 882, 892, 955, 965, 975, 985, 1048, 1058, 1068, 1078, 1088
Offset: 1

Views

Author

Lekraj Beedassy, Dec 01 2003

Keywords

Comments

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

Examples

			78 is in the sequence since 2^78 = 302231454903657293676544 and 5^78 = 3308722450212110699485634768279851414263248443603515625
98 is in the sequence since 2^98 = 316912650057057350374175801344 and 5^98 = 315544362088404722164691426113114491869282574043609201908111572265625.
		

Crossrefs

Cf. A088995.

Programs

  • Maple
    filter:= n -> convert(2^n,base,10)[-1]=convert(5^n,base,10)[-1]:
    select(filter, [$0..1000]); # Robert Israel, Aug 09 2018
  • Mathematica
    Select[ Range[ 1000 ], IntegerDigits[ 2^# ][ [ 1 ] ] == IntegerDigits[ 5^# ][ [ 1 ] ] & ]
  • PARI
    is(n)=(digits(2^n)[1]==digits(5^n)[1]);
    for(n=0,10^3,if(is(n),print1(n,", "))); \\ Joerg Arndt, Aug 10 2018
    
  • Python
    def ok(n): return str(2**n)[0] == str(5**n)[0]
    print([k for k in range(1100) if ok(k)]) # Michael S. Branicky, Nov 03 2022

Extensions

Edited by Robert G. Wilson v, Dec 02 2003

A359698 Least k > 0 such that the first n digits of 2^k and 3^k are identical.

Original entry on oeis.org

1, 17, 193, 619, 2016, 91958, 91958, 8186278, 45392361, 977982331, 26450915298, 91600221212, 196425900073, 14810317269038, 44430951807114, 626642721222487, 626642721222487, 102882886570917135, 874191214492184404, 3830977578643912683, 86801197487071715103
Offset: 0

Views

Author

Keith F. Lynch, May 20 2023

Keywords

Examples

			   n    k = a(n)   1st n digits
  --  -----------  -------------
   0            1
   1           17  1...
   2          193  12...
   3          619  217...
   4         2016  7524...
   5        91958  13071...
   6        91958  130719...
   7      8186278  1701547...
   8     45392361  17179395...
   9    977982331  725070476...
  10  26450915298  2919267309...
a(3) = 619 because 2^619 = 2.175...*10^186 and 3^619 = 2.177...*10^295 both begin with the same three digits (in base ten), and this is not true of any smaller positive integer than 619.
a(0) = 1 because 2^1 and 3^1 share zero leading digits.
		

Crossrefs

Extensions

a(11)-a(20) from Jon E. Schoenfield, May 21 2023

A363683 Square array A(n, k), n, k > 0, read by antidiagonals; A(n, k) is the least e > 0 such that n^e and k^e have the same initial digit, or -1 if no such e exists.

Original entry on oeis.org

1, 4, 4, 9, 1, 9, 2, 17, 17, 2, 3, 7, 1, 7, 3, 4, 5, 8, 8, 5, 4, 5, 4, 9, 1, 9, 4, 5, 8, 2, 3, 11, 11, 3, 2, 8, 16, 5, 11, 6, 1, 6, 11, 5, 16, 1, 17, 7, 4, 9, 9, 4, 7, 17, 1, 1, 4, 17, 10, 6, 1, 6, 10, 17, 4, 1, 1, 4, 9, 14, 5, 15, 15, 5, 14, 9, 4, 1
Offset: 1

Views

Author

Rémy Sigrist, Jun 15 2023

Keywords

Comments

Conjecture: all terms are positive.

Examples

			Array A(n, k) begins:
  n\k |  1   2   3   4   5   6   7   8   9  10  11  12
  ----+-----------------------------------------------
    1 |  1   4   9   2   3   4   5   8  16   1   1   1
    2 |  4   1  17   7   5   4   2   5  17   4   4   9
    3 |  9  17   1   8   9   3  11   7  17   9  16   5
    4 |  2   7   8   1  11   6   4  10  14   2   2   2
    5 |  3   5   9  11   1   9   6   5   4   3   3   3
    6 |  4   4   3   6   9   1  15   7  11   4   4  10
    7 |  5   2  11   4   6  15   1  17  18   5   5   4
    8 |  8   5   7  10   5   7  17   1  18   8  28   6
    9 | 16  17  17  14   4  11  18  18   1  16  23   8
   10 |  1   4   9   2   3   4   5   8  16   1   1   1
   11 |  1   4  16   2   3   4   5  28  23   1   1   1
   12 |  1   9   5   2   3  10   4   6   8   1   1   1
		

Crossrefs

Programs

  • PARI
    A(n,k) = { for (e = 1, oo, if (digits(n^e)[1]==digits(k^e)[1], return (e));); }

Formula

A(n, k) = A(k, n).
A(10*n, k) = A(n, k).
A(n, n) = 1.
A(n, 1) = A098174(n).
Showing 1-3 of 3 results.