login
Least integer m such that between m and 2m there are n palindromes.
2

%I #16 Oct 01 2021 10:50:06

%S 10,1,2,3,4,51,61,66,76,86,96,111,121,131,141,157,167,177,187,197,202,

%T 212,222,232,242,258,268,278,288,298,303,313,323,333,343,359,369,379,

%U 389,399,404,414,424,434,444,460,470,480,490,500,501,5101,5201,5301

%N Least integer m such that between m and 2m there are n palindromes.

%C _Dean Hickerson_ showed that this sequence is infinite.

%H Michael S. Branicky, <a href="/A085764/b085764.txt">Table of n, a(n) for n = 1..1000</a>

%o (Python)

%o def ispal(n): s = str(n); return s == s[::-1]

%o def a(n):

%o m, cm = 1, 2

%o while cm != n:

%o cm = cm - ispal(m) + ispal(2*m+1) + ispal(2*m+2)

%o m += 1

%o return m

%o print([a(n) for n in range(1, 55)]) # _Michael S. Branicky_, Oct 01 2021

%Y Cf. A002113, A085763.

%K nonn,base

%O 1,1

%A _Jason Earls_ and _Amarnath Murthy_, Jul 22 2003

%E More terms from _Jason Earls_, Jul 24 2003