The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A262038 Least palindrome >= n. 77
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Could be called nextpalindrome() in analogy to the nextprime() function A007918. As for the latter (A151800), there is the variant "next strictly larger palindrome" which equals a(n+1), and thus differs from a(n) iff n is a palindrome; see PARI code. Might also be called palindromic ceiling function in analogy to the name "palindromic floor" proposed for A261423. LINKS M. F. Hasler, Table of n, a(n) for n = 0..10000 Eric Weisstein's World of Mathematics, Palindromic Number Wikipedia, Palindromic number MATHEMATICA palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Table[k = n; While[! palQ@ k, k++]; k, {n, 0, 80}] (* Michael De Vlieger, Sep 09 2015 *) PROG (PARI) {A262038(n, d=digits(n), p(d)=sum(i=1, #d\2, (10^(i-1)+10^(#d-i))*d[i], if(bittest(#d, 0), 10^(#d\2)*d[#d\2+1])))= for(i=(#d+3)\2, #d, d[i]>d[#d+1-i]&&break; (d[i]9||return(p(d)); d[i]=0); 10^#d+1} \\ For a function "next strictly larger palindrome", delete the i==#d and n<10... part. - M. F. Hasler, Sep 09 2015 (Haskell) a262038 n = a262038_list !! n a262038_list = f 0 a002113_list where    f n ps'@(p:ps) = p : f (n + 1) (if p > n then ps' else ps) -- Reinhard Zumkeller, Sep 16 2015 CROSSREFS Cf. A002113, A261423, A262037. Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509. Sequence in context: A123241 A033862 A329201 * A265558 A082273 A256755 Adjacent sequences:  A262035 A262036 A262037 * A262039 A262040 A262041 KEYWORD nonn,base AUTHOR M. F. Hasler, Sep 08 2015 STATUS approved

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

Last modified January 16 10:52 EST 2021. Contains 340206 sequences. (Running on oeis4.)