Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A309325
Numbers that are the sum of two successive palindromes.
0
1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 33, 55, 77, 99, 121, 143, 165, 187, 200, 212, 232, 252, 272, 292, 312, 332, 352, 372, 393, 414, 434, 454, 474, 494, 514, 534, 554, 574, 595, 616, 636, 656, 676, 696, 716, 736, 756, 776, 797, 818, 838, 858, 878, 898, 918, 938, 958, 978
OFFSET
1,2
FORMULA
a(n) = A002113(n) + A002113(n+1).
MATHEMATICA
Total /@ Partition[Select[Range[0, 500], PalindromeQ], 2, 1]
PROG
(Python)
from itertools import chain, count, islice
def A309325_gen(): # generator of terms
c = 0
for a in 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)):
yield c+(c:=a)
A309325_list = list(islice(A309325_gen(), 20)) # Chai Wah Wu, Jun 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Jul 23 2019
STATUS
approved