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”).
%I #8 Sep 21 2024 19:18:32
%S 0,10,105,1035,19900,162165,1057785,10628355,497086215,1037196285,
%T 10379451160,100611783910,1009356921705,22222221111111,
%U 159874280406855,2222222211111111,30089723753897506,138961477283832105,1001626196023188555,22222222221111111111,200026159385335864701,1000091594147464659855
%N Smallest n-digit triangular number whose external digits as well as internal digits form triangular numbers, or -1 if no such number exists.
%C Smallest n-digit number in A077368. - _Andrew Howroyd_, Sep 21 2024
%F a(n) <= A077370(n). - _Andrew Howroyd_, Sep 21 2024
%o (PARI) \\ here isok(k) tests if k in A077368.
%o isok(k)={if(k<10, 1, my(b=10^logint(k,10)); ispolygonal(k%b\10,3) && ispolygonal(k\b*10+k%10,3))}
%o a(n)={for(k=(sqrtint(8*(10^(n-1)-1)+1)+1)\2, (sqrtint(8*(10^n-1)+1) -1)\2, my(t=k*(k+1)/2); if(isok(t), return(t))); oo} \\ _Andrew Howroyd_, Sep 21 2024
%Y Cf. A077366, A077367, A077368, A077370.
%K base,easy,nonn
%O 1,2
%A _Amarnath Murthy_, Nov 06 2002
%E Offset corrected and a(6)-a(22) from _Andrew Howroyd_, Sep 21 2024