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.

A089717 Triangular numbers with palindromic indices.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 66, 253, 561, 990, 1540, 2211, 3003, 3916, 4950, 5151, 6216, 7381, 8646, 10011, 11476, 13041, 14706, 16471, 18336, 20503, 22578, 24753, 27028, 29403, 31878, 34453, 37128, 39903, 42778, 46056, 49141, 52326, 55611
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 24 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=500,paldx},paldx=Table[If[PalindromeQ[n],1,0],{n,0,nn}];Pick[Accumulate[ Range[ 0,nn]],paldx,1]] (* Harvey P. Dale, Jun 11 2024 *)
  • Python
    from itertools import chain, count, islice
    def A089717_gen(): # generator of terms
        return map(lambda n:n*(n+1)//2,chain((0,),chain.from_iterable(chain((int((s:=str(d))+s[-2::-1]) for d in range(10**l,10**(l+1))), (int((s:=str(d))+s[::-1]) for d in range(10**l,10**(l+1)))) for l in count(0))))
    A089717_list = list(islice(A089717_gen(),20)) # Chai Wah Wu, Jun 23 2022

Formula

a(n) = A000217(A002113(n)).

Extensions

Definition corrected by Lambert.Klasen and David Wasserman, Oct 04 2005
More terms from David Wasserman and Klaus Brockhaus, Oct 04 2005