%I #9 May 30 2019 09:00:08
%S 8,16,24,32,40,48,51,56,59,67,75,83,99,102,110,112,118,153,155,168,
%T 198,211,224,254,267,280,297,310,323,336,344,346,354,357,362,370,392,
%U 397,400,405,413,443,456,469,499,512,525,542,555,568,581,598,611,624,641,654
%N Numbers n with k digits in base x (MSD(n)=d_k, LSD(n)=d_1) such that, chosen one of their digits in position d_k < j < d_1, is Sum_{i=j..k}{(i-j+1)*d_i} = Sum_{i=1..j-1}{(j-i)*d_i}. Case x = 7.
%C All the palindromic numbers in base 7 with an even number of digits belong to the sequence.
%C Here the fulcrum is between two digits while in the sequence from A282107 to A282115 is one of the digits.
%C The first number with this property in all the bases from 2 to 7 is
%C 86964945. - _Giovanni Resta_, Feb 15 2017
%H Paolo P. Lava, <a href="/A282148/b282148.txt">Table of n, a(n) for n = 1..10000</a>
%e 641 in base 7 is 1604. If we split the number in 16 and 04 we have 6*1 + 1*2 = 8 for the left side and 0*1 + 4*2 = 8 for the right one.
%p P:=proc(n,h) local a,j,k: a:=convert(n, base, h):
%p for k from 1 to nops(a)-1 do
%p if add(a[j]*(k-j+1),j=1..k)=add(a[j]*(j-k),j=k+1..nops(a))
%p then RETURN(n); break: fi: od: end: seq(P(i,7),i=1..10^3);
%Y Cf. A282107 - A282115, A282143 - A282147.
%K nonn,base,easy
%O 1,1
%A _Paolo P. Lava_, Feb 15 2017
|