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!)
A358986 a(n) is the number of numbers of the form k + reverse(k) for at least one number k < 10^n. 3
10, 28, 207, 548, 3966, 10462, 75435, 198890, 1433489, 3779246 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence differs from the partial sums of A358985; see the Example section.
LINKS
EXAMPLE
There are 10 numbers of the form k + reverse(k) for 1-digit numbers k -- 0, 2, 4, 6, 8, 10, 12, 14, 16, and 18 -- so a(1) = 10.
There are 18 numbers of the form k + reverse(k) for 2-digit numbers k -- 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, and 198 -- and none of these 18 numbers are among the 10 numbers counted in a(1), so a(2) = 10 + 18 = 28.
There are 180 numbers of the form k + reverse(k) for 3-digit numbers k, but exactly one of those -- 121 = 110 + reverse(110) = 110 + 11 -- is also a number of the form k + reverse(k) for a 2-digit number k: e.g., 29 + reverse(29) = 29 + 92 = 121. So a(3) = 10 + 18 + 180 - 1 = 207.
PROG
(Python)
def A358986(n):
kset = set()
for i in range(1, 10**(n-1)):
for j in range(int((s:=str(i))[0])+1):
kset.add(10*i+j+int(str(j)+s[::-1]))
return 10+len(kset) # Chai Wah Wu, Dec 09 2022
CROSSREFS
Sequence in context: A219812 A345725 A185985 * A239477 A345696 A066527
KEYWORD
nonn,base,more
AUTHOR
Jon E. Schoenfield, Dec 08 2022
EXTENSIONS
a(8)-a(10) from Chai Wah Wu, Dec 09 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 August 30 13:06 EDT 2024. Contains 375543 sequences. (Running on oeis4.)