login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085804 Least k such that n^n + k is a palindrome. 0
0, 0, 6, 6, 98, 8, 885, 545, 4294, 1, 542971, 567942, 4985950, 34463095, 817539359, 3335212865, 1825278551, 60542888969, 351980024812, 6758401, 13316726728064, 355067132000559, 10940544943498235, 100371505302529555, 98630474467606263 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..25.

MATHEMATICA

NextPalindrome[n_] := Block[{l = Floor[Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[idn, Ceiling[l/2]]]] FromDigits[ Take[idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[idn, Ceiling[l/2]], Reverse[ Take[idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]]; f[n_] := Block[{}, If[ FromDigits[ Reverse[ IntegerDigits[n^n]]] == n^n, 0, NextPalindrome[n^n] - n^n]];

CROSSREFS

Sequence in context: A065239 A146892 A320824 * A012125 A267139 A170915

Adjacent sequences:  A085801 A085802 A085803 * A085805 A085806 A085807

KEYWORD

base,nonn

AUTHOR

Jason Earls, Jul 24 2003

EXTENSIONS

Edited and extended by Robert G. Wilson v, Jul 26 2003

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 24 19:42 EDT 2019. Contains 321448 sequences. (Running on oeis4.)