OFFSET
1,3
COMMENTS
Indices of triangular numbers in the sequence of palindromes.
EXAMPLE
A002113(26) = 171 is a triangular number, so 26 is a term.
MATHEMATICA
Join[{0}, Flatten[Position[Select[Range[10^7], PalindromeQ], _?(OddQ[Sqrt[ 8#+1]]&)]]] (* The program generates the first 22 terms of the sequence. *) (* Harvey P. Dale, Jun 17 2022 *)
PROG
(ARIBAS) var c, n, m:integer; end; begin c:=0; for n:=0 to 100000000 do if n = intreverse(n) then m:=floor(sqrt(2*n)); if m*(m+1) div 2 = n then write(c, ", "); end; inc(c); end; end; end;
(PARI) {c=0; for(n=0, 10000000, k=n; r=0; while(k>0, d=divrem(k, 10); k=d[1]; r=10*r+d[2]); if(n==r, m=sqrtint(2*n); if(m*(m+1)/2==n, print1(c, ", ")); c++))}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Klaus Brockhaus, Nov 27 2004
EXTENSIONS
a(24) to a(38) from Klaus Brockhaus, Oct 05 2005
STATUS
approved