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.

A067497 Smallest k for which 2^k is n+1 decimal digits long, and equivalently numbers k such that 1 is the first digit of 2^k.

Original entry on oeis.org

0, 4, 7, 10, 14, 17, 20, 24, 27, 30, 34, 37, 40, 44, 47, 50, 54, 57, 60, 64, 67, 70, 74, 77, 80, 84, 87, 90, 94, 97, 100, 103, 107, 110, 113, 117, 120, 123, 127, 130, 133, 137, 140, 143, 147, 150, 153, 157, 160, 163, 167, 170, 173, 177, 180, 183, 187, 190, 193, 196
Offset: 0

Views

Author

Benoit Cloitre, Feb 22 2002

Keywords

Comments

The asymptotic density of this sequence is log_10(2) = 0.301029... (A007524). - Amiram Eldar, Jan 27 2021

Crossrefs

Programs

  • GAP
    Filtered([0..200],n->ListOfDigits(2^n)[1]=1); # Muniru A Asiru, Oct 22 2018
    
  • Mathematica
    a[n_] := Block[{k = 0}, While[ Floor[Log[10, 2^k] + 1] < n, k++ ]; k]; Table[ a[n], {n, 1, 61}]
    Table[Ceiling[n*Log[2, 10]], {n, 0, 59}] (* Jean-François Alcover, Jan 29 2014, after Vladeta Jovovic *)
  • PARI
    for(n=0,500, if(floor(2^n/10^(floor(n*log(2)/log(10))))==1,print1(n,", ")))
    
  • PARI
    a(n) = ceil(n*log(10)/log(2)); \\ Michel Marcus, May 13 2017
    
  • Python
    def A067497(n): return (10**n-1).bit_length() # Chai Wah Wu, Apr 02 2023
    
  • Sage
    [ceil(n*log(10)/log(2)) for n in range(0, 60)] # Stefano Spezia, Aug 31 2024

Formula

a(n) = ceiling(n*log_2(10)). - Vladeta Jovovic, Jun 20 2002
a(n) = log_2(A067488(n+1)). - Charles L. Hohn, Jun 09 2024

Extensions

Additional comments from Lekraj Beedassy, Jun 20 2002 and from Rick Shephard, Jun 27 2002

A066343 Beatty sequence for log_2(10).

Original entry on oeis.org

3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59, 63, 66, 69, 73, 76, 79, 83, 86, 89, 93, 96, 99, 102, 106, 109, 112, 116, 119, 122, 126, 129, 132, 136, 139, 142, 146, 149, 152, 156, 159, 162, 166, 169, 172, 176, 179, 182, 186, 189, 192, 195, 199
Offset: 1

Views

Author

Vladeta Jovovic, Dec 15 2001

Keywords

Comments

Number of positive integers <= 10^n that are divisible by no prime exceeding 2.
Maximum number of prime divisors of positive integers <= 10^n counted with multiplicity. - Martin Renner, Apr 04 2014
You wish to represent the rational number n/d in decimal notation, where n is an integer, d is a nonzero integer, and precision(d) represents the number of decimal digits in d. The decimal notation representation of n/d will either terminate or repeat with a repetend. If the decimal notation representation terminates then this sequence defines the maximum number of decimal digits to the right of the decimal point (after truncating trailing zeros) for a given precision of d ... floor(precision(d) * log_2(10)). - Michael T Howard, Jul 17 2017
Beatty complement of A066344. - Jianing Song, Jan 27 2019

Crossrefs

Cf. A020862 (log_2(10)).

Programs

  • Maple
    seq(floor(log[2](10)*n),n=1..60); # Martin Renner, Apr 04 2014
  • Mathematica
    Table[ Floor[ n*Log[2, 10]], {n, 60}] (* Robert G. Wilson v, May 27 2005 *)
  • PARI
    { l=log(10)/log(2); for (n=1, 1000, a=floor(n*l); write("b066343.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 11 2010
    
  • Python
    def A066343(n): return (5**n).bit_length()+n-1 # Chai Wah Wu, Sep 08 2024

Formula

a(n) = floor(n*log_2(10)).

A158911 Numbers of the form 2^i*5^j - 1.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 15, 19, 24, 31, 39, 49, 63, 79, 99, 124, 127, 159, 199, 249, 255, 319, 399, 499, 511, 624, 639, 799, 999, 1023, 1249, 1279, 1599, 1999, 2047, 2499, 2559, 3124, 3199, 3999, 4095, 4999, 5119, 6249, 6399, 7999, 8191, 9999, 10239
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 30 2009

Keywords

Comments

Numbers n such that 10^n is divisible by n+1.
Numbers n such that the prime divisors of n+1 are also divisors of the numbers m obtained by the concatenation of n and n+1. For example, for n=39, m = 3940, the divisors of 40 are {2, 5} and the divisors of 3940 are {2, 5, 197}. - Michel Lagneau, Dec 20 2011
The entries correspond to positional information of A156703, which stem from ratios of consecutive integers. For example, A156703(4)=875 yields a(5). This is because 875 was produced from n/(n+1) where n=7, i.e., 7/8 = 0.875. Similarly, a(23)=399 stems from 399/400=0.9975 (A156703(22)). - Bill McEachen, Jan 05 2014

Crossrefs

Programs

  • Magma
    [n: n in [0..10^5] | Modexp(10, n, n+1) eq 0]; // Vincenzo Librandi, Mar 07 2018
  • Maple
    N:= 20000: # to get all terms <= N
    sort([seq(seq(2^i*5^j-1, j=0..floor(log[5]((N+1)/2^i))),i=0..ilog2(N+1))]); # Robert Israel, Mar 06 2018
  • Mathematica
    fQ[n_] := PowerMod[10, n, n + 1] == 0; Select[ Range[0, 11000], fQ] (* Robert G. Wilson v, Sep 08 2010 *)
  • PARI
    is(n)=n=(n+1)>>valuation(n+1,2);ispower(n,,&n);n==1||n==5 \\ Charles R Greathouse IV, Jan 12 2012
    
  • PARI
    list(lim)=my(v=List(), N); lim++; for(n=0, log(lim)\log(5), N=5^n; while(N<=lim, listput(v, N-1); N<<=1)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jan 12 2012
    

Formula

a(n) = A003592(n) - 1.

Extensions

Edited by N. J. A. Sloane, Aug 25 2010, Oct 04 2010
Showing 1-3 of 3 results.