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-2 of 2 results.

A217176 a(n) is the first digit (from the left) to appear n times in succession in the decimal representation of the Lucas(A217166(n)).

Original entry on oeis.org

2, 1, 3, 0, 2, 2, 9, 7, 2, 1, 1, 5, 5, 7, 7, 9
Offset: 1

Views

Author

V. Raman, Sep 27 2012

Keywords

Crossrefs

Programs

  • Mathematica
    k = 0; Join[{2}, Table[While[d = IntegerDigits[LucasL[k]]; prt = Partition[Differences[d], n - 1, 1]; ! MemberQ[prt, Table[0, {n - 1}]], k++]; d[[Position[prt, Table[0, {n - 1}]][[1, 1]]]], {n, 2, 8}]] (* T. D. Noe, Oct 03 2012 *)
  • Python
    def A217176(n):
        if n == 1:
            return 2
        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 range(10):
                    if l[k] in s:
                        return k
                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 03 2024

A217192 a(n) is the number of digits in the decimal representation of the smallest Lucas number that contains n consecutive identical digits.

Original entry on oeis.org

1, 2, 8, 17, 24, 113, 657, 1346, 3667, 17318, 68642, 355612, 355612, 1678243, 1678243, 16207565
Offset: 1

Views

Author

V. Raman, Sep 27 2012

Keywords

Comments

Number of digits in Lucas(k) is equal to floor(1 + k*log_10((1+sqrt(5))/2)).

Crossrefs

Programs

  • Mathematica
    k = 0; Join[{1}, Table[While[d = IntegerDigits[LucasL[k]]; ! MemberQ[Partition[Differences[d], n - 1, 1], Table[0, {n - 1}]], k++]; Length[d], {n, 2, 8}]] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def A217192(n):
        if n == 1:
            return 1
        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 len(s)
                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 04 2024
Showing 1-2 of 2 results.