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 21-25 of 25 results.

A217166 a(n) is the least value of k such that the decimal expansion of Lucas(k) contains n consecutive identical digits.

Original entry on oeis.org

0, 5, 36, 78, 112, 538, 3139, 6436, 17544, 82864, 328448, 1701593, 1701593, 8030342, 8030342, 77552742
Offset: 1

Views

Author

V. Raman, Sep 27 2012

Keywords

Comments

a(12) > 1512000. - Chai Wah Wu, Dec 17 2014
a(17) > 10^8. - Nick Hobson, Feb 02 2024

Crossrefs

Programs

  • C
    // See Links section.
  • Mathematica
    k = 0; Join[{0}, Table[While[d = IntegerDigits[LucasL[k]]; ! MemberQ[Partition[Differences[d], n - 1, 1], Table[0, {n - 1}]], k++]; k, {n, 2, 8}]] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217166(n):
        if n == 1:
            return 0
        else:
            l, y, x = [str(d)*n for d in range(10)], 2, 1
            for m in range(1, 10**9):
                s = str(x)
                for k in l:
                    if k in s:
                        return m
                y, x = x, y+x
            return 'search limit reached'
    # Chai Wah Wu, Dec 17 2014
    

Extensions

a(11) from Chai Wah Wu, Dec 17 2014
a(12)-a(16) from Nick Hobson, Feb 02 2024

A238448 Smallest number m such that 2^m contains a string of n consecutive increasing digits in its decimal representation.

Original entry on oeis.org

0, 7, 28, 135, 391, 992, 5837, 9485, 15975, 244178
Offset: 1

Views

Author

Derek Orr, Feb 26 2014

Keywords

Comments

This is an increasing sequence (but not necessarily strictly increasing).

Examples

			7 is the smallest exponent such that 2^7 contains two consecutive increasing digits (2^7 = 128).
28 is the smallest exponent such that 2^28 ( = 268435456)  contains three consecutive increasing digits (456).
a(6) = 992 from  2^992 =
418558049682135672245478534789063207250548754572474065407714995457168379_345\
    678_17284890561672488119458109166910841919797858872862722356017328064756\
    15116630782786940537040715228680107267602488727296075852403533779290461\
    69580757764357779904060393635270100437362409630553424235540298930640110\
    82834640896 - _N. J. A. Sloane_, Aug 12 2018
		

Crossrefs

Cf. A045875.

Programs

  • Mathematica
    a[1]=0; a[n_] := Block[{k = 4, p = 16}, While[Max[ Length /@ Select[ Split@ Differences@ IntegerDigits@p, First@# == 1 &]] < n-1, k++; p *= 2]; k]; a/@ Range[7] (* Giovanni Resta, Feb 26 2014 *)
  • Python
    def Str(x):
      for n in range(10**5):
        count = 0
        i = 0
        if len(str(2**n)) == x and x == 1:
          return n
        while i < len(str(2**n))-1:
          if int(str(2**n)[i]) == int(str(2**n)[i+1])-1:
            count += 1
            i += 1
          else:
            if count == x-1:
              return n
            else:
              count = 0
              i += 1
        if count == x-1:
          return n
    x = 1
    while x < 50:
      print(Str(x))
      x += 1

Extensions

a(8)-a(10) from Giovanni Resta, Feb 26 2014
Definition and examples corrected ("integers" changed to "digits") by N. J. A. Sloane, Aug 12 2018

A238449 Smallest numbers m such that 2^m contains a string of n consecutive decreasing integers in its decimal representation.

Original entry on oeis.org

0, 5, 25, 78, 161, 341, 1315, 28238, 56047, 283789
Offset: 1

Views

Author

Derek Orr, Feb 26 2014

Keywords

Comments

This is an increasing sequence (not necessarily strictly increasing).

Examples

			5 is the smallest exponent such that 2^5 contains two consecutive decreasing integers (2^5 = 32).
25 is the smallest exponent such that 2^25 contains three consecutive decreasing integers (2^25 = 33554432).
		

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := Block[{k = 4, p = 16}, While[Max[ Length /@  Select[ Split@ Differences@ IntegerDigits@p, First@# == -1 &]] < n-1, k++; p *= 2]; k]; a/@ Range[7] (* Giovanni Resta, Feb 26 2014 *)
  • Python
    def StrDec(x):
      for n in range(10**5):
        count = 0
        i = 0
        if len(str(2**n)) == x and x == 1:
          return n
        while i < len(str(2**n))-1:
          if int(str(2**n)[i]) == int(str(2**n)[i+1])-1:
            count += 1
            i += 1
          else:
            if count == x-1:
              return n
            else:
              count = 0
              i += 1
        if count == x-1:
          return n
    x = 1
    while x < 50:
      print(StrDec(x))
      x += 1

Extensions

a(8)-a(10) from Giovanni Resta, Feb 26 2014

A175924 Smallest power of 2 with n repeated digits.

Original entry on oeis.org

1, 65536, 16777216, 2199023255552, 1684996666696914987166688442938726917102321526408785780068975640576
Offset: 1

Views

Author

Grant Garcia, Oct 18 2010, Oct 20 2010

Keywords

Comments

The subsequent terms are too large to display.
a(6) and a(7), 2^971 and 2^972, respectively, both of which have 293 digits; a(8), 2^8554, has 2576 digits. a(9), 2^42485, has 12790 digits.
Corresponding exponents of 2 are 0, 16, 24, 41, 220, 971, 972, 8554, 42485, 42486, 271979. [Zak Seidov, Oct 19 2010]

Examples

			a(1) is 1 because it is the first power of 2; all integers have at least one digit.
a(2) is 65536 because it is the first power of 2 with two of the same digit in a row.
a(3) is 16777216 because it is the first power of 2 with three of the same digit in a row.
		

Crossrefs

Subsequence of A000079 (powers of 2).
Cf. A045875.

Programs

  • Mathematica
    f[n_] := Block[{k = 0}, While[ !MemberQ[Length /@ Split@ IntegerDigits[2^k], n], k++ ]; 2^k]; Table[f[n], {n, 5}] (* Robert G. Wilson v, Oct 21 2010 *)
  • Python
    import math
    for N in range(1, 10):
        repdigits = 1
        n = 0
        while repdigits < N:
            n += 1
            s = str(2 ** n)
            prev = ""
            repdigits = maxrepdigits = 1
            for d in s:
                if d == prev: repdigits += 1
                else:
                    maxrepdigits = max(maxrepdigits, repdigits)
                    repdigits = 1
                prev = d
            repdigits = max(maxrepdigits, repdigits)
        print(N, 2 ** n)

A217185 a(n) is the number of digits in the decimal representation of the smallest power of 2 that contains n consecutive identical digits.

Original entry on oeis.org

1, 5, 8, 13, 67, 293, 293, 2576, 12790, 12790, 81874, 312865, 520061, 2063822
Offset: 1

Views

Author

V. Raman, Sep 27 2012

Keywords

Comments

Number of digits in 2^k is equal to floor(1 + k*log_10(2)).

Crossrefs

Programs

  • Mathematica
    k = 0; Join[{1}, Table[While[d = IntegerDigits[2^k]; prt = Partition[Differences[d], n - 1, 1]; ! MemberQ[prt, Table[0, {n - 1}]], k++]; Length[d], {n, 2, 8}]] (* T. D. Noe, Oct 03 2012 *)
Previous Showing 21-25 of 25 results.