OFFSET
1,1
COMMENTS
A064834(a(n)) > 0. - Reinhard Zumkeller, Sep 18 2013
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Patrick De Geest, World!Of Numbers
MATHEMATICA
palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; DeleteCases[ Range[10, 110], _?palQ] (* Harvey P. Dale, Jan 28 2012 *)
Table[If[PalindromeQ[n], Nothing, n], {n, 120}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 13 2019 *)
PROG
(Haskell)
a029742 n = a029742_list !! (n-1)
a029742_list = filter ((== 0) . a136522) [1..]
-- Reinhard Zumkeller, Oct 09 2011
(Magma) [n: n in [0..150] | Intseq(n) ne Reverse(Intseq(n))]; // Bruno Berselli, Apr 01 2015
(PARI) is(n)=my(d=digits(n)); d!=Vecrev(d) \\ Charles R Greathouse IV, Feb 06 2017
(Python)
def ok(n): s = str(n); return s != s[::-1]
print(list(filter(ok, range(108)))) # Michael S. Branicky, Oct 12 2021
(Python)
def A029742(n):
def f(x): return n+x//10**((l:=len(s:=str(x)))-(k:=l+1>>1))-(int(s[k-1::-1])>x%10**k)+10**(k-1+(l&1^1))-1
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Jul 24 2024
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Oct 09 2011
STATUS
approved