Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A030285
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A030285 Palindromes whose digits do not appear in previous term. +0
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 222, 303, 414, 505, 616, 707, 818, 909, 1111, 2002, 3113, 4004, 5115, 6006, 7117, 8008, 9119, 20002, 31113, 40004, 51115, 60006, 71117, 80008, 91119, 200002, 311113, 400004 (list; graph; listen)
OFFSET

0,3

COMMENT

Although the sequence is infinite, in a sense it cycles. The outside of the next palindrome beginning with 20 continues 31, 40, 51, 60, 71, 80, 91, and back to 20. The inside oscillates between increasing number of zeros and ones.

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]]]]]]]]; a[0] = 0; a[n_] := a[n] = Block[{k = a[n - 1], d = IntegerDigits[a[n - 1]]}, While[ Intersection[d, IntegerDigits[k]] != {}, k = NextPalindrome[k]]; k]; Table[ a[n], {n, 0, 50}]

CROSSREFS

Sequence in context: A062687 A109882 A109872 this_sequence A048321 A071267 A110784

Adjacent sequences: A030282 A030283 A030284 this_sequence A030286 A030287 A030288

KEYWORD

nonn,base

AUTHOR

Patrick De Geest (pdg(AT)worldofnumbers.com)

EXTENSIONS

Edited by Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 27 2003

page 1

Search completed in 0.004 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 July 25 07:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research