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.

A226487 First available increasing palindromes (A002113) found in the decimal expansion of the number e-2 (A001113).

Original entry on oeis.org

7, 8, 818, 2662, 9669, 39193, 94349, 99699, 985589, 988890, 5065605, 6609066, 7193917, 7390937, 8316138, 43488434, 563303365, 799929997, 1149559411, 68088588086, 85367376358, 208532235802, 991964469199
Offset: 1

Views

Author

Keywords

Comments

The entry 988890 is actually 0988890.

Crossrefs

Programs

  • Mathematica
    e = RealDigits[E-2, 10, 2500000][[1]]; palQ[n_] := n == Reverse[n]; mx = 0; k = 1;   While[k < 1000000, j = 1; While[j <= k, If[ palQ[ Take[ e, {j, k}]], p = FromDigits[ Take[e, {j, k}]]; If[p > mx, mx = p; Print[p]; e = Drop[e, k]; k = 0; Break[]]]; j++]; k++]

A279885 First n-digit palindrome in the decimal expansion of Pi.

Original entry on oeis.org

3, 33, 141, 3993, 46264, 999999, 1736371, 23911932, 398989893, 136776310, 21348884312, 450197791054, 9475082805749, 95715977951759, 697763767367796, 4855796336975584, 42611063036011624, 700015327723510007, 5851405951595041585, 74054579700797545047
Offset: 1

Views

Author

Bobby Jacobs, Jan 06 2017

Keywords

Comments

Numbers can start with 0. For example, a(10) = 0136776310.
The first 6-digit palindrome in the decimal expansion of Pi has all of its digits the same (999999).
No further terms wholly within the first 10^9 digits of Pi. - Michael S. Branicky, Jan 10 2022

Examples

			a(2) = 33 because 33 is the first 2-digit palindrome in the decimal expansion of Pi = 3.14159265358979323846264(33)...
		

Crossrefs

Programs

  • Mathematica
    With[{d = First@ RealDigits@ N[Pi, 10^7]}, Table[If[Length@ # == 0, 0, FromDigits@ First@ #] &@ Select[Partition[d, n, 1], # == Reverse@ # &], {n, 13}]] (* Michael De Vlieger, Jan 06 2017 *)
  • Python
    from sympy import S
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    # with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
    pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def ispal(s): return s == s[::-1]
    def a(n):
        for idx in range(len(pi_digits)-n):
            if ispal(pi_digits[idx:idx+n]):
                return int(pi_digits[idx:idx+n]), idx
        return None, None # Not found: Increase number of digits
    print([a(n)[0] for n in range(1, 13)]) # Michael S. Branicky, Jan 10 2022

Extensions

a(8)-a(15) from Michael De Vlieger, Jan 06 2017
a(16)-a(20) from Michael S. Branicky, Jan 10 2022
Showing 1-2 of 2 results.