This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A087598 #27 Aug 02 2024 18:16:34 %S A087598 0,1,3,6,10,21,28,36,45,55,66,78,171,465,528,666,2211,4465,22791, %T A087598 333336 %N A087598 Numbers m such that all terms in the sequence m, A040115(m), A040115(A040115(m)), ..., 0 are triangular numbers (A000217). %C A087598 a(21) would need to have A040115(a(21)) among the listed terms. Equation A040115(x) = t for any term t reduces to computing integral points on a finite number of elliptic curve. Computation shows that no any new number can be obtained this way. Hence the sequence is finite and complete. - _Max Alekseyev_, Aug 02 2024 %e A087598 528 is a term since A040115(528) = 36, A040115(36) = 3, A040115(3) = 0, where 528, 36, 3, and 0 are triangular numbers. %t A087598 trnoQ[n_]:=IntegerQ[(Sqrt[8n+1]-1)/2]; oknQ[n_]:=Module[{ll= NestWhileList[FromDigits[Abs[Differences[IntegerDigits[#]]]]&, n, #>9&]}, Length[ll]>1&&And@@trnoQ/@ll]; Select[Accumulate[Range[ 2000000]],oknQ] (* _Harvey P. Dale_, May 15 2011 *) %o A087598 (PARI) dd(k)={ local(kshf,res,dig,odig,p) ; kshf=k ; res=0 ; odig=kshf % 10 ; p=0 ; while(kshf>9, kshf=floor(kshf/10) ; dig=kshf % 10 ; res += 10^p*abs(dig-odig) ; odig=dig ; p++ ; ) ; return(res) ; } isA000217(n)={ if( issquare(1+8*n), return(1), return(0) ) ; } A000217(n)={ return(n*(n+1)/2) ; } isA087598(n)={ local(nredu) ; nredu=n ; while( nredu>10, if( isA000217(nredu), nredu=dd(nredu), return(0) ) ; ) ; if( isA000217(nredu), return(1), return(0) ) ; } { for(k=4,1000000, if(isA087598(A000217(k)), print1(A000217(k),",") ; ) ; ) ; } \\ _R. J. Mathar_, Nov 19 2006 %Y A087598 Cf. A000217, A040115, A087597, A087599, A087600. %K A087598 base,nonn,full,fini %O A087598 1,3 %A A087598 _Amarnath Murthy_, Sep 18 2003 %E A087598 Corrected and extended by _R. J. Mathar_, Nov 19 2006 %E A087598 Name clarified and terms 0,1,3,6 prepended by _Max Alekseyev_, Jul 26 2024