Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Aug 24 2024 13:36:30
%S 0,22,121,1331,10401,105501,1006001,10077001,100080001,1000990001,
%T 10001010001,100011110001,1000012100001,10000133100001,
%U 100000141000001,1000001551000001,10000001610000001,100000017710000001,1000000018100000001,10000000199100000001,100000000202000000001
%N Diagonal of triangle in A081930.
%p isA002113 := proc(n) local digrev,d ; digrev := convert(n,base,10) ; for d from 1 to nops(digrev)/2 do if op(d,digrev) <> op(-d,digrev) then RETURN(false) ; fi ; od ; RETURN(true) ; end: A081930 := proc(n) local a,k ; a := [] ; k := 10^(n-1) ; while nops(a) < n do if isA002113(k) then a := [op(a),k] ; fi ; k := k+1 ; od ; RETURN(a) ; end: A081931 := proc(n) local nrow ; nrow := A081930(n) ; RETURN(op(-1,nrow)) ; end: for n from 1 to 18 do A081931(n) ; od ; # _R. J. Mathar_, Apr 04 2007
%o (Python)
%o def A081931(n):
%o s = str(10**((n-1)//2)-(n==1)+n-1)
%o return int(s+s[-1-n%2::-1]) # _Pontus von Brömssen_, Aug 24 2024
%Y Cf. A081930, A081932.
%K base,nonn
%O 1,2
%A _Amarnath Murthy_, Apr 01 2003
%E More terms from _R. J. Mathar_, Apr 04 2007
%E More terms from _Pontus von Brömssen_, Aug 21 2024
%E a(1) corrected by _Pontus von Brömssen_, Aug 24 2024