# [seqfan] Re: a(n-1)+a(n) = palindrome

Maximilian Hasler maximilian.hasler at gmail.com
Tue Oct 19 16:12:52 CEST 2010

```I think you made a mistake after a(n)=50.

I get:
ispal(x)=vecextract(x=Vec(Str(x)),"-1..1")==x
u=[];L=0; for( n=1,99, i=0; until(!setsearch(u,i++) & ispal(L+i),);
u=setunion(u,Set(L=i)); print1(L","))

1,2,3,4,5,6,16,17,27,28,38,39,49,50,51,15,7,26,18,37,29,48,40,
59,42,13,9,24,20,35,31,46,53,58,8,14,19,25,30,36,41,47,52,69,
32,12,10,23,21,34,43,45,54,57,44,11,22,33,55,56,65,66,75,76,85,
86,95,96,106,116,126,136,146,157,105,97,64,67,74,77,84,87,94,
108,63,68,73,78,83,88,93,98,104,118,114,128,124,138,134,148...

Also the definition should specify that a(n) must not occur before.

You could also reference A073879 ("sum(a(i),i=1..n) is palindrome").

Maximilian

u=[];S=0; for( n=1,99, i=0; until(!setsearch(u,i++) & ispal(S+i),);
u=setunion(u,Set(i)); print1(i","); S+=i)

1,2,3,5,11,22,33,24,10,20,30,41,40,50,21,60,31,70,51,81,80,61,71,91,90,
112,110,220,330,231,440,550,121,660,341,770,451,671,880,561,781,891,
882,100,200,300,410,400,500,210,600,310,700,510,810,800,610,710,910,
900,1010,111,1110,1210,1310,1320,1410,1510,1120,911,1610,1420,1710,
1520,1820,1810,211,1920,1910,1220,2020,2120,711,2220,2320,1620,
2420,1421,2520,1720,2620,2230,1011,2720,2330,2820,2031,2920,2130,...

On Tue, Oct 19, 2010 at 8:58 AM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
>
> Hello SeqFans,
>
>
>
> This is (I guess) the lexicographically first sequence
>
> with a(1)=1 and a(n-1)+a(n)= a palindrome number (see
>
> http://www.research.att.com/~njas/sequences/A002113)
>
>
>
> S = 1,2,3,4,5,6,16,17,27,28,38,39,49,50,52,14,8,25,19,36,
>
> 30,47,41,58,43,12,10,23,21,34,32,45,54,57,13,20,24,31,35,
>
> 42,46,53,48,7,15,18,26,29,37,40,59,62,69,72,79,22,11,33,44,
>
> 55,56,65,66,75,76,85,86,95,96,...
>
>
>
> I think this is a permutation of the naturals.
>
>
>
> Best,
>
> É.
>
> [Next week I'll compute the similar sequence T, where
>
>  a(n)+n = palindrome]
>
>
>
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/

```