login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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 = 3.
3

%I #9 May 30 2019 08:59:40

%S 4,8,11,12,19,24,28,33,36,40,47,52,56,57,61,68,72,80,84,85,92,97,99,

%T 104,108,109,113,120,125,141,145,156,168,170,171,172,183,193,204,208,

%U 216,218,229,240,244,245,250,252,255,257,269,276,278,280,291,297,301,312

%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 = 3.

%C All the palindromic numbers in base 3 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.

%H Paolo P. Lava, <a href="/A282144/b282144.txt">Table of n, a(n) for n = 1..10000</a>

%e 229 in base 3 is 22111. If we split the number in 22 and 111 we have 2*1 + 2*2 = 6 for the left side and 1*1 + 1*2 + 1*3 = 6 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,3),i=1..10^3);

%Y Cf. A282107 - A282115, A282143, A282145 - A282151.

%K nonn,base,easy

%O 1,1

%A _Paolo P. Lava_, _Giovanni Resta_, Feb 07 2017