login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357195 a(n) is the smallest palindrome of the form k*(2*n+k-1)/2 where k is a positive integer. 1
1, 2, 3, 4, 5, 6, 7, 8, 9, 33, 11, 969, 222, 99, 66, 33, 242, 282, 424, 161, 66, 22, 212, 252, 646, 171, 55, 252, 414, 555, 525, 99, 33, 474, 1001, 111, 5005, 77, 484, 1111, 1881, 414, 808, 44, 606, 141, 404, 303, 99, 101, 555, 444, 333, 222, 55, 171, 484 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
Sequence in context: A004849 A261279 A295638 * A173551 A271534 A072482
KEYWORD
base,nonn
AUTHOR
Gleb Ivanov, Sep 17 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)