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 A058429 #17 Aug 11 2024 14:41:33 %S A058429 2,548,585688,58591812,200824138,5773251280200207952, %T A058429 20832739723817975138362 %N A058429 Numbers k such that k^2 contains only digits {0,3,4}, not ending with zero. %H A058429 P. De Geest, <a href="https://www.worldofnumbers.com/threedigits.htm">Index to related sequences</a> %H A058429 Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/math02/math0210.htm#034">Sporadic tridigital solutions</a> %o A058429 (PARI) \\ From _M. F. Hasler_, May 14 2007, edited Nov 14 2017: (Start) %o A058429 admissibleMod(LIM=10000)={ local( t=[4], tt=1 ); while( LIM > tt*=10, t=concat([t,t+vector(#t,i,3)*tt,t+vector(#t,i,4)*tt])); /*print("t="t);*/ t=Set(t); tt=[]; for(i=1,LIM, setsearch(t,i^2%LIM) && tt=concat(tt,i)); concat(tt,LIM+tt[1])} %o A058429 A058429(Nmax=1e19,N=2,addMod=100000,debug=1)={my( a=[], Nnext, N2, numDigits, place, addNext=admissibleMod(addMod=round(addMod)), d=1, add=vector(addMod,i,if(i-1>addNext[d],d++);addNext[d]-i+1), nextOK=[0,2,1,0,0,5,4,3,2,1], pow10 = vector( d=#Str((Nmax=round(Nmax))^2), i, 10^(i-1)) ); nextOK = vector( #nextOK, i, if( nextOK[i],nextOK[i]*pow10)); N=round(N); while( Nmax >= N, numDigits = #Str(N2=N^2); 3 > N2 \ pow10[numDigits] && N = sqrtint( 3*pow10[numDigits]+3 )+1; Nnext = min( Nmax, sqrtint(pow10[numDigits]*10)\3*2); if( debug, print( "checking from "N" to "Nnext": <= ",1+max(0,Nnext-N)*(#addNext-1) \ addMod," candidates.")); N += add[1+ N%addMod]; place=1; while( Nnext >= N, dr = divrem( N2=N^2, pow10[ place=numDigits ] ); while( place-- && !d=nextOK[1+ (dr = divrem( dr[2], pow10[ place ] ))[1]], ); place || break; N = sqrtint( N2 - dr[2] + d[ place ])+1; N+=add[1+N%addMod]); if( !place, debug && print( N, "^2 = ", N^2); a=concat(a,N); N=Nnext+1 ); N=Nnext*5\2);a } \\ (End) %Y A058429 Cf. A058430. %K A058429 nonn,base,hard %O A058429 1,1 %A A058429 _Patrick De Geest_, Nov 15 2000 %E A058429 a(6) from _M. F. Hasler_, May 14 2007 %E A058429 a(7) from Mishima's page added by _Max Alekseyev_, Jul 13 2009