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.

Previous Showing 11-20 of 25 results. Next

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

A317873 Number of digits in 2^(n!).

Original entry on oeis.org

1, 1, 1, 2, 8, 37, 217, 1518, 12138, 109238, 1092378, 12016155, 144193850, 1874520045, 26243280622, 393649209329, 6298387349264, 107072584937472, 1927306528874488, 36618824048615255, 732376480972305082, 15379906100418406713, 338357934209204947674
Offset: 0

Views

Author

Keywords

Comments

The old definition (which did not match the data) was "Number of digits in the numerators of partial sums for Liouville's constant, read as base-2 (binary) numbers (A145572)."

Crossrefs

Programs

  • Maple
    Digits := 900: # for n <= 300
    a := n -> ceil(exp(lnGAMMA(n + 1))*log10(2)):
    seq(a(n), n = 0..30);  # Peter Luschny, Apr 18 2024
  • Mathematica
    Array[ Floor[#! Log10@2 + 1] &, 22]

Formula

a(n) = A034887(n!).

Extensions

Better definition suggested by Martin Renner, Mar 24 2024
a(0)=1 prepended by Alois P. Heinz, Jul 27 2025

A348553 Number of digits in 11^n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 0

Views

Author

Seiichi Manyama, Oct 22 2021

Keywords

Examples

			a(24) = 25 because 11^24 = 9849732675807611094711841, which has 25 digits.
a(25) = 27 because 11^25 = 108347059433883722041830251, which has 27 digits.
		

Crossrefs

Number of digits in b^n: A034887 (b=2), A034888 (b=3), A210434 (b=4), A210435 (b=5), A210436 (b=6), A210062 (b=7), this sequence (b=11).

Programs

  • Mathematica
    a[n_] := IntegerLength[11^n]; Array[a, 100, 0] (* Amiram Eldar, Oct 22 2021 *)
  • PARI
    a(n) = #Str(11^n);
    
  • Python
    def a(n): return len(str(11**n))
    print([a(n) for n in range(98)]) # Michael S. Branicky, Oct 22 2021

Formula

a(n) = A055642(A001020(n)) = A055642(11^n).

A371887 a(1) = 1; for n > 1, a(n) is the smallest positive integer k such that the digits of 2^k contain 2^a(n-1) as a proper substring.

Original entry on oeis.org

1, 5, 15, 507
Offset: 1

Views

Author

Adam Vulic, Apr 11 2024

Keywords

Comments

From David A. Corneth, Apr 11 2024: (Start)
This sequence is well defined as A030000 is well defined; every finite string of digits is contained in some power of 2.
An upper bound for a(n), n > 1, can be found by solving 2^k == 2^a(n-1) (mod 10^m) where m is the number of digits of 2^a(n-1) (cf. A034887). This gives a(n) <= k = a(n-1) + 4*5^(m-1) (cf. A005054). So a(5) <= 507 + 4*5^152, which is about 7*10^106. (End)

Examples

			a(2) is the smallest k > 0 such that the digits of 2^k contain 2^a(1) = 2^1 = 2 as a proper substring, so a(2) = 5. (2^5 = 32.)
a(3) is the smallest k > 0 such that the digits of 2^k contain 2^a(2) = 32 as a proper substring, so a(3) = 15. (2^15 = 32768.)
		

Crossrefs

Programs

  • Mathematica
    k = 0; Rest@ NestList[(While[SequenceCount[IntegerDigits[2^k], IntegerDigits[2^#]] == 0, k++]; k++; k - 1) &, 1, 4] (* Michael De Vlieger, Apr 19 2024 *)

A106432 Levenshtein distance between successive powers of 2 in decimal representation.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 6, 6, 5, 6, 6, 6, 6, 8, 8, 8, 9, 9, 8, 8, 8, 9, 8, 10, 10, 8, 10, 10, 11, 11, 11, 11, 10, 11, 13, 14, 13, 13, 14, 12, 11, 14, 10, 12, 14, 12, 16, 17, 16, 17, 17, 16, 15, 18, 17, 17, 18, 18, 17, 18, 20, 17, 16, 21, 19, 19, 20, 22, 20, 22, 21
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 22 2006

Keywords

Comments

a(n) = minimal number of editing steps (delete, insert or substitute) to transform 2^n into 2^(n+1) in decimal representation;
a(n) <= A034887(n).

Crossrefs

Cf. A000079.

Programs

  • Haskell
    -- import Data.Function (on)
    a106432 n = a106432_list !! n
    a106432_list = zipWith (levenshtein `on` show)
                           a000079_list $ tail a000079_list where
       levenshtein us vs = last $ foldl transform [0..length us] vs where
          transform xs@(x:xs') c = scanl compute (x+1) (zip3 us xs xs') where
             compute z (c', x, y) = minimum [y+1, z+1, x + fromEnum (c' /= c)]
    -- Reinhard Zumkeller, Nov 10 2013
  • Mathematica
    levenshtein[s_List, t_List] := Module[{d, n = Length@s, m = Length@t}, Which[s === t, 0, n == 0, m, m == 0, n, s != t, d = Table[0, {m + 1}, {n + 1}]; d[[1, Range[n + 1]]] = Range[0, n]; d[[Range[m + 1], 1]] = Range[0, m]; Do[ d[[j + 1, i + 1]] = Min[d[[j, i + 1]] + 1, d[[j + 1, i]] + 1, d[[j, i]] + If[ s[[i]] === t[[j]], 0, 1]], {j, m}, {i, n}]; d[[ -1, -1]] ]]; Table[ levenshtein[IntegerDigits[2^n], IntegerDigits[2^(n + 1)]], {n, 0, 80}] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Jan 25 2006

A115566 Numbers k such that 2^k, 2^(k+1) and 2^(k+2) have the same number of digits.

Original entry on oeis.org

1, 4, 7, 10, 11, 14, 17, 20, 21, 24, 27, 30, 31, 34, 37, 40, 41, 44, 47, 50, 51, 54, 57, 60, 61, 64, 67, 70, 71, 74, 77, 80, 81, 84, 87, 90, 91, 94, 97, 100, 103, 104, 107, 110, 113, 114, 117, 120, 123, 124, 127, 130, 133, 134, 137, 140, 143, 144, 147, 150, 153, 154
Offset: 1

Views

Author

Stefan Steinerberger, Mar 11 2006

Keywords

Comments

The density of this sequence is 1 - 2*log_10(2) = 0.3979400086720376...

Examples

			2^4 = 16, 2^5 = 32, 2^6 = 64: all these numbers have two digits.
2^10 = 1024, 2^11 = 2048, 2^12 = 4096: all these numbers have three digits.
		

Crossrefs

Cf. A001682 (same definition with 3 instead of 2).
Cf. A034887 (number of digits in 2^n).

Programs

  • Magma
    [k:k in [1..160]|#Intseq(2^k) eq #Intseq(2^(k+2))]; // Marius A. Burtea, May 20 2019
  • Maple
    select(n -> ilog10(2^n)=ilog10(2^(n+2)), [$1..1000]); # Robert Israel, May 19 2019
  • Mathematica
    Select[Range[220], Floor[Log[10, 2]*# ] == Floor[Log[10, 2]*(# + 2)] &]

Formula

floor(log_10(2)*k) = floor(log_10(2)*(k+1)) = floor(log_10(2)*(k+2)).

A158520 Numbers n such that 2^n divided by the number of digits of 2^n is an integer.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 24, 25, 26, 50, 51, 52, 53, 103, 104, 105, 106, 210, 211, 212, 422, 423, 424, 425, 848, 849, 850, 1698, 1699, 1700, 3399, 3400, 3401, 6800, 6801, 6802, 6803, 13604, 13605, 13606, 27210, 27211, 27212, 27213
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 20 2009

Keywords

Comments

Also n such that A000079(n)/A034887(n) is an integer.

Crossrefs

Programs

  • Mathematica
    ndnQ[n_]:=Module[{n2=2^n},Divisible[n2,IntegerLength[n2]]]; Select[Range[ 0,28000],ndnQ] (* Harvey P. Dale, Apr 16 2013 *)

Extensions

Extended by R. J. Mathar, Mar 26 2009

A192543 Let r be the largest real zero of x^n - x^(n-1) - x^(n-2) - ... - 1 = 0. Then a(n) is the value of k which satisfies the equation 0.5/10^k < 2 - r < 5/10^k.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22
Offset: 1

Views

Author

Ruskin Harding, Dec 31 2012

Keywords

Comments

Same as A034887 except for the offset and a(1). - T. D. Noe, Feb 11 2013

Examples

			For n = 5, the root is approximately r = 1.96594823. The value of k that satisfies 0.5/10^k < 2-r < 5/10^k is 2 as 0.005 < 0.03405177 < 0.05. So a(5) = 2.
		

Programs

  • PARI
    a(n)=if(n>1, -log(4-2*solve(x=1.5,2,x^n-(1-x^n)/(1-x)))\log(10)+1, 0) \\ Charles R Greathouse IV, Jan 15 2013

A227689 a(n) is the least integer k such that 2^k - 1 has at least 10^n digits.

Original entry on oeis.org

1, 30, 329, 3319, 33216, 332190, 3321925, 33219278, 332192807, 3321928092, 33219280946, 332192809486, 3321928094885, 33219280948871, 332192809488733, 3321928094887360, 33219280948873621, 332192809488736232, 3321928094887362345, 33219280948873623476
Offset: 0

Views

Author

Olivier de Mouzon, Jul 19 2013

Keywords

Examples

			For n = 2, A000225(328) has 99 digits and A000225(329) has 100 digits, so a(2) = 329.
		

Crossrefs

Programs

  • PARI
    a(n) = ceil(log(10^(10^n-1)+1)/log(2)); \\ Michel Marcus, Jun 28 2021

Formula

a(n) = ceiling(log_2(10^(10^n-1)+1)).
Limit_{n -> oo} a(n)/10^n = log_2(10) = A020862. - Alois P. Heinz, Jun 28 2021

Extensions

a(7)-a(19) from Alois P. Heinz, Jun 28 2021

A354782 Second digit from left in decimal expansion of 2^n (n >= 4).

Original entry on oeis.org

6, 2, 4, 2, 5, 1, 0, 0, 0, 1, 6, 2, 5, 3, 6, 2, 0, 0, 1, 3, 6, 3, 7, 3, 6, 3, 0, 1, 2, 5, 7, 4, 8, 3, 7, 4, 0, 1, 3, 7, 7, 5, 0, 4, 8, 6, 1, 2, 5, 0, 8, 6, 2, 4, 8, 7, 1, 3, 6, 2, 8, 6, 3, 4, 9, 9, 1, 3, 7, 4, 8, 7, 5, 5, 0, 0, 2, 4, 8, 6, 9, 8, 7, 5, 0, 1, 2, 4, 9, 9, 9, 9, 9, 5, 1, 3, 2, 5, 0, 0, 0, 0, 1, 6, 2, 4, 2, 5, 1
Offset: 4

Views

Author

N. J. A. Sloane, Jul 07 2022, following a suggestion from Alexander Wajnberg

Keywords

Examples

			2^4 = 16, so a(4) = 6. 2^5 = 32, so a(5) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> parse(""||(2^n)[2]):
    seq(a(n), n=4..112);  # Alois P. Heinz, Jul 07 2022
  • Mathematica
    A354782[n_]:=IntegerDigits[2^n][[2]];Array[A354782,100,4] (* Paolo Xausa, Oct 22 2023 *)
  • Python
    def A354782(n): return int(str(1<Chai Wah Wu, Jul 07 2022
Previous Showing 11-20 of 25 results. Next