login

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”).

Smallest k such that A067030(n) = k + reverse(k).
9

%I #4 Mar 30 2012 17:27:34

%S 0,1,2,3,4,5,10,6,7,8,9,11,12,13,14,15,16,17,18,100,19,29,39,120,49,

%T 59,130,69,79,140,89,99,150,101,160,111,170,121,180,131,190,141,151,

%U 102,161,112,171,122,181,132,191,142,152,103,162,113,172,123,182,133,192

%N Smallest k such that A067030(n) = k + reverse(k).

%H T. D. Noe, <a href="/A067033/b067033.txt">Table of n, a(n) for n = 0..1000</a>

%e a(12) = 12 since A067030(12) = 33 and 12 is the smallest k such that 33 = k + reverse(k).

%o (ARIBAS): function a067033(a,b: integer); var n,k,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; while k <= n do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = k + rev then write(k,",") k := n + 1; else inc(k); end; end; end; end; a067033(0,500);.

%Y Cf. A033865, A067030, A067031, A067032, A067034.

%K base,easy,nonn

%O 0,3

%A _Klaus Brockhaus_, Dec 29 2001