OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..171 from R. J. Mathar)
MAPLE
isA261453 := proc(n)
local ndgs, dgs, d ;
if isA002113(n) then
ndgs := A055642(n) ;
if type(ndgs, 'odd') and A043537(n) = 2 then
dgs := convert(n, base, 10) ;
for d from 2 to nops(dgs)/2 do
if op(d, dgs) <> op(d-1, dgs) then
return false;
end if;
end do:
true ;
else
false;
end if;
else
false;
end if;
end proc:
n := 1:
for i from 100 to 2000000 do
if isA261453(i) then
printf("%d %d\n", n, i) ;
n := n+1 ;
end if;
end do: # R. J. Mathar, Sep 30 2015
MATHEMATICA
id[n_]:=IntegerDigits[n]; len[n_]:=Length[id[n]];
del[n_]:=Delete[id[n], Ceiling[len[id[n]]/2]];
u[n_]:=Union[del[id[n]]];
Select[Range[10^5], StringMatchQ[ToString[#], a__~~b_~~a__]&&Length[u[#]]==1&&u[#]!= Union[id[#]]&] (* Ivan N. Ianakiev, Sep 06 2015 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
for d in count(1):
for out in "123456789":
for mid in "0123456789":
if mid != out:
yield int(out*d + mid + out*d)
print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022
(PARI) is_a002113(n) = my(d=digits(n)); d==Vecrev(d)
is_a210666(n) = my(d=digits(n)); #d>2 && (#setintersect(vecsort(d), vector(#d, x, vecmax(d)))==#d-1 || #setintersect(vecsort(d), vector(#d, x, vecmin(d)))==#d-1)
is_a001633(n) = #Str(n)%2 \\ after Charles R Greathouse IV in A001633
is(n) = is_a002113(n) && is_a210666(n) && is_a001633(n) \\ Felix Fröhlich, May 25 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Felix Fröhlich, Aug 25 2015
STATUS
approved