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.

A262243 First differences of A262224.

Original entry on oeis.org

1, 2, 4, 8, 6, 22, 44, 88, 7, 8, 191, 8, 9, 99, 9, 7, 5, 9, 8, 6, 5, 7, 55, 9, 8, 626, 252, 5, 9, 151, 66, 7, 7, 9, 8, 66, 8, 8, 848, 696, 33, 5, 343, 3773, 7, 55, 8, 616, 232, 464, 9, 9, 9, 55, 9, 9, 9, 9, 9, 55, 11, 121, 242, 484, 99, 7, 7, 8, 9, 9, 101, 8
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2015

Keywords

Comments

All terms are palindromic by definition of A262224.

Crossrefs

Programs

  • Haskell
    a262243 n = a262243_list !! n
    a262243_list = zipWith (-) (tail a262224_list) a262224_list

Formula

a(n) = A262224(n+1) - A262224(n) = A047813(A262224(n)).

A047813 Largest palindromic substring of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 22, 3, 4, 5, 6, 7, 8, 9, 3, 3, 3, 33, 4, 5, 6, 7, 8, 9, 4, 4, 4, 4, 44, 5, 6, 7, 8, 9, 5, 5, 5, 5, 5, 55, 6, 7, 8, 9, 6, 6, 6, 6, 6, 6, 66, 7, 8, 9, 7, 7, 7, 7, 7, 7, 7, 77, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 88, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Keywords

Comments

a(n) = A262188(n,A262190(n)-1). - Reinhard Zumkeller, Sep 14 2015

Examples

			a(1313) = Max{1,3,131,313} = 313.
		

Crossrefs

Programs

  • Haskell
    a047813 = last . a262188_row
    -- Reinhard Zumkeller, Sep 14 2015, Aug 23 2011
    
  • Mathematica
    palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse[ idn]]; f[n_] := Block[{id = IntegerDigits@ n, mx = -Infinity}, k = Length@ id; While[k > 0 && mx == -Infinity, mx = Max[mx, Select[ FromDigits@# & /@ Partition[id, k, 1], palQ[#, 10] &]]; k--]; mx] (* Robert G. Wilson v, Aug 24 2011 *)
    lps[n_]:=Module[{idn=IntegerDigits[n]},Max[FromDigits/@Select[ Flatten[ Table[ Partition[ idn,i,1],{i,Length[idn]}],1],#==Reverse[#]&]]]; Array[ lps,100,0] (* Harvey P. Dale, Jan 09 2015 *)
  • Python
    def c(s): return (s[0] != "0" or s == "0") and s == s[::-1]
    def a(n):
        s = str(n)
        ss = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1))
        return max(int(w) for w in ss if c(w))
    print([a(n) for n in range(96)]) # Michael S. Branicky, Sep 18 2022

A262223 a(n) = n + largest palindrome contained in decimal representation of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 14, 16, 18, 20, 22, 24, 26, 28, 22, 23, 44, 26, 28, 30, 32, 34, 36, 38, 33, 34, 35, 66, 38, 40, 42, 44, 46, 48, 44, 45, 46, 47, 88, 50, 52, 54, 56, 58, 55, 56, 57, 58, 59, 110, 62, 64, 66, 68, 66, 67, 68, 69, 70, 71
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2015

Keywords

Comments

a(n) = n + A047813(n).

Crossrefs

Cf. A047813, A262224 (iteration, start = 1).

Programs

  • Haskell
    a262223 n = n + a047813 n
Showing 1-3 of 3 results.