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

A065206
Numbers which need one 'Reverse and Add' step to reach a palindrome.
14
10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 38, 40, 41, 42, 43, 45, 47, 50, 51, 52, 53, 54, 56, 60, 61, 62, 63, 65, 70, 71, 72, 74, 80, 81, 83, 90, 92, 100, 102, 103, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 117
OFFSET
1,1
COMMENTS
The number of steps starts at 0, so palindromes (A002113) are excluded.
Numbers k such that A033665(k) = 1. - Andrew Howroyd, Dec 05 2024
MATHEMATICA
Select[Range[10, 120], !PalindromeQ[#]&&PalindromeQ[#+IntegerReverse[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2017 *)
PROG
(ARIBAS): function revadd_steps(k, stop: integer); var c, n, m, steps, rev: integer; begin n := 0; c := 0; while c < stop do m := n; rev := int_reverse(m); steps := 0; while steps < k and m <> rev do m := m + rev; rev := int_reverse(m); inc(steps); end; if steps = k and m = rev then write(n, " "); inc(c); end; inc(n); end; end; revadd_steps(1, 66).
(Haskell)
a065206 n = a065206_list !! (n-1)
a065206_list = filter ((== 1) . a136522 . a056964) a029742_list
-- Reinhard Zumkeller, Oct 14 2011
(PARI) isok(n, s=1)={for(k=0, s, my(r=fromdigits(Vecrev(digits(n)))); if(r==n, return(k==s)); n += r); 0} \\ Andrew Howroyd, Dec 05 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Klaus Brockhaus, Oct 21 2001
EXTENSIONS
Offset corrected by Harry J. Smith, Oct 13 2009
STATUS
approved