

A238880


The sequence is a succession of pairs of nonnegative integers. The digits, in each pair, form a palindromic pattern. The sequence starts with a(1)=0 and is always extended with the smallest available integer not yet present in the sequence.


2



0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 20, 102, 21, 112, 22, 122, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 30, 103, 31, 113, 33, 133, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 40, 104, 41, 114, 44, 144, 45, 54, 46, 64, 47, 74, 48, 84, 49, 94, 50, 105, 51, 115, 55, 155, 56, 65, 57, 75, 58, 85, 59, 95, 60, 106, 61, 116, 66, 166, 67, 76, 68, 86, 69, 96, 70, 107, 71, 117, 77, 177, 78, 87, 79, 97, 80, 108
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

This sequence is a permutation of the nonnegative integers.


LINKS

Giovanni Resta, Table of n, a(n) for n = 1..10000


EXAMPLE

(0,10)(1,11)(2,12)(3,13)(4,14)(5,15)... The palindromic pattern is clearly visible in each pair.


MATHEMATICA

(* first 10000 terms *) s = {0, 10}; t = 0*Range[20000]; t[[10]] = 1; Do[ j = Position[t, 0, 1, 1][[1, 1]]; AppendTo[s, j]; t[[j]] = 1; d = IntegerDigits[j]; h = 1; While[t[[h]] == 1  (p = Join[d, IntegerDigits[h]]; p != Reverse[p]), h++]; AppendTo[s, h]; t[[h]] = 1; If[Mod[Length@s, 500] == 0, Print[Length@s, " ", {j, h}]], {4999}]; s (* Giovanni Resta, Mar 06 2014 *)


PROG

(Haskell)
import Data.List (delete)
a238880 n = a238880_list !! (n1)
a238880_list = f [0..] where
f (u:us) = u : g us where
g vs = h vs where
h (w:ws) = if reverse ys == ys then w : f (delete w vs) else h ws
where ys = xs ++ show w
xs = show u
 Reinhard Zumkeller, Jul 14 2014


CROSSREFS

Cf. A245234 (inverse).
Sequence in context: A093645 A182620 A317330 * A340138 A332177 A130858
Adjacent sequences: A238877 A238878 A238879 * A238881 A238882 A238883


KEYWORD

nonn,easy,base,nice,look


AUTHOR

Eric Angelini, Mar 06 2014


STATUS

approved



