OFFSET
1,2
PROG
(Python)
pal10 = lambda n: str(n) == str(n)[::-1]
def seq(n):
k = 1
while not pal10(k*(2*n+k-1)//2):k+=1
return k*(2*n+k-1)//2
print([seq(n) for n in range(1, 100)])
(Python)
from itertools import count
def A357195(n): return next(filter(lambda n:(s := str(n))[:(t:=len(s)+1>>1)]==s[:-t-1:-1], (k*((n<<1)+k-1)>>1 for k in count(1)))) # Chai Wah Wu, Oct 29 2022
(PARI) ispal(p) = my(d=digits(p)); d==Vecrev(d);
a(n) = my(k=1); while(!ispal(x=k*(2*n+k-1)/2), k++); x; \\ Michel Marcus, Sep 17 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Gleb Ivanov, Sep 17 2022
STATUS
approved