login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136522 a(n) = 1 if n is a palindrome, otherwise 0. 55
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(A002113(n)) = 1; a(A029742(n)) = 0.
a(n) = A202022(n) for n <= 100, a(101) = 1, A202022(101) = 0. - Reinhard Zumkeller, Dec 10 2011
LINKS
FORMULA
a(n) = if A004086(n) = n then 1 else 0. - Reinhard Zumkeller, Apr 08 2011
a(n) = A000007(A064834(n)). - Reinhard Zumkeller, Sep 18 2013
MATHEMATICA
fQ[n_]:=Module[{id=IntegerDigits[n]}, Boole[id==Reverse[id]]]; Array[fQ, 100] (* Vladimir Joseph Stephan Orlovsky, Dec 29 2010 *)
Table[If[PalindromeQ[n], 1, 0], {n, 0, 120}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 23 2019 *)
PROG
(Haskell)
a136522 n = fromEnum $ n == a004086 n -- Reinhard Zumkeller, Apr 08 2011
(Python)
def A136522(n): return int((s:=str(n))[:(t:=(len(s)+1)//2)]==s[:-t-1:-1]) # Chai Wah Wu, Jun 23 2022
CROSSREFS
Cf. A178225.
Sequence in context: A336556 A105586 A202022 * A352871 A188641 A086299
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Apr 21 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 02:55 EDT 2024. Contains 370952 sequences. (Running on oeis4.)