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.

A180458 Largest palindromic number <= n-th-prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 11, 11, 11, 22, 22, 22, 33, 33, 33, 44, 44, 55, 55, 66, 66, 66, 77, 77, 88, 88, 101, 101, 101, 101, 111, 121, 131, 131, 131, 141, 151, 151, 161, 161, 171, 171, 181, 191, 191, 191, 191, 202, 222, 222, 222, 232, 232, 232, 242, 252, 262, 262, 262, 272
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 06 2010

Keywords

Crossrefs

Programs

  • Maple
    # given lists Primes of primes and Palis of palindromes, with Palis[-1] > Primes[-1]
    m:= 1; A:= 'A':
    for n from 1 to nops(Primes) do
      while m < nops(Palis) and Palis[m+1] <= Primes[n] do m:= m+1 od:
      A[n]:= Palis[m]
    od:
    seq(A[i],i=1..nops(Primes)); # Robert Israel, Apr 26 2016
  • Mathematica
    lpn[n_]:=Module[{k=0},While[!PalindromeQ[n-k],k++];n-k]; Table[lpn[n],{n,Prime[Range[60]]}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 18 2020 *)

Extensions

Corrected by Robert Israel, Apr 26 2016