Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A085804
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A085804
%S A085804 0,0,6,6,98,8,885,545,4294,1,542971,567942,4985950,34463095,817539359,
%T A085804 3335212865,1825278551,60542888969,351980024812,6758401,13316726728064,
%U A085804 355067132000559,10940544943498235,100371505302529555,98630474467606263
%N A085804 Least k such that n^n + k is a palindrome.
%t A085804 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]];
%Y A085804 Sequence in context: A078290 A065239 A146892 this_sequence A012125 A123190 
               A165641
%Y A085804 Adjacent sequences: A085801 A085802 A085803 this_sequence A085805 A085806 
               A085807
%K A085804 base,nonn
%O A085804 1,3
%A A085804 Jason Earls (zevi_35711(AT)yahoo.com), Jul 24 2003
%E A085804 Edited and extended by Robert G. Wilson v (rgwv(AT)rgwv.com), Jul 26 
               2003

    
page 1

Search completed in 0.001 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 20 16:54 EST 2009. Contains 171081 sequences.


AT&T Labs Research