Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A058429
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A058429 Numbers n such that n^2 contains only digits {0,3,4}, not ending with zero. +0
7
2, 548, 585688, 58591812, 200824138, 5773251280200207952, 20832739723817975138362 (list; graph; listen)
OFFSET

1,1

LINKS

P. De Geest, Index to related sequences

Hisanori Mishima, Sporadic tridigital solutions

PROGRAM

(PARI) 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, if( setsearch(t, i^2%LIM), tt=concat(tt, i))); concat(tt, LIM+tt[1])} A058429(Nmax=1e19, N=2, addMod=100000, debug=1)={local( 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); if( 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]], ); if( !place, break); N = sqrtint( N2 - dr[2] + d[ place ])+1; N+=add[1+N%addMod]; ); if( !place, if( debug, print( N, "^2 = ", N^2 )); a=concat(a, N); N=Nnext+1 ); N = floor(Nnext*5/2); ); a } - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), May 14 2007

CROSSREFS

Cf. A058430.

Sequence in context: A101702 A119780 A120840 this_sequence A117509 A049364 A159529

Adjacent sequences: A058426 A058427 A058428 this_sequence A058430 A058431 A058432

KEYWORD

nonn,base,hard

AUTHOR

Patrick De Geest (pdg(AT)worldofnumbers.com), Nov 15 2000.

EXTENSIONS

One more term from M. F. Hasler (Maximilian.Hasler(AT)gmail.com), May 14 2007

One more term from Mishima's page. Max Alekseyev (maxale(AT)gmail.com), Jul 13 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 15 00:47 EST 2009. Contains 170825 sequences.


AT&T Labs Research