cp's OEIS Frontend

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.

A087599 Smallest nonzero n-digit term of A087597, or 0 if no such number exists.

This page as a plain text file.
%I A087599 #19 Jul 29 2024 06:18:13
%S A087599 1,10,105,2211,16836,105111,2220778,14319276,221098906,1087061878,
%T A087599 11402689605,223577504556,1264725045100,50869724563503,
%U A087599 111335989114503,2399795843858155,11141229266441550,127955437456464996,1070124037258522456
%N A087599 Smallest nonzero n-digit term of A087597, or 0 if no such number exists.
%C A087599 Conjecture: No term is zero.
%e A087599 a(4) = 2211, A040115(2211) = 10.
%o A087599 (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) ; } ndigs(n)={ local(nshft,res) ; res=0 ; nshft=n; while(nshft>0, res++ ; nshft=floor(nshft/10) ; ) ; return(res) ; } isA087597(n)={ if( isA000217(n) && isA000217(dd(n)), return(1), return(0) ) ; } A087599(n)={ local(k,T) ; k=floor(-0.5+sqrt(0.25+2*10^(n-1))) ; T=A000217(k) ; if(ndigs(T)<n, k++ ) ; while(1, T=A000217(k) ; if(ndigs(T)>n, return(0) ) ; if( isA087597(T), return(T) ) ; k++ ; ) ; } { for(n=2,21, print1(A087599(n),",") ; ) ; } \\ _R. J. Mathar_, Nov 19 2006
%Y A087599 Cf. A000217, A040115, A087597, A087598, A087600.
%K A087599 base,nonn
%O A087599 1,2
%A A087599 _Amarnath Murthy_, Sep 18 2003
%E A087599 Corrected and extended by _R. J. Mathar_, Nov 19 2006
%E A087599 a(14)-a(18) from _Donovan Johnson_, May 08 2010
%E A087599 a(19) from _Donovan Johnson_, Jun 19 2011
%E A087599 a(1)=1 prepended by _Max Alekseyev_, Jul 27 2024