A068802 Smaller of two consecutive squares which have no common digits.
0, 1, 4, 9, 16, 25, 36, 64, 196, 361, 484, 841, 1936, 5929, 8836, 69696, 1999396, 29997529
Offset: 0
Examples
29997529 is a term since 29997529 and 30008484 are two consecutive squares with no common digits.
Programs
-
Maple
s := X->convert(convert(X,base,10),set); seq(`if`((s(n^2) intersect s((n+1)^2))={},n^2,printf("")),n=1..350000);
-
Mathematica
For[lastn=-1; r=0, r<500, r++, For[d=1, d<10, d++, n=Ceiling[Sqrt[d*10^r]]-1; If[n>lastn, lastn=n; If[Intersection[IntegerDigits[n^2], IntegerDigits[(n+1)^2]]=={}, Print[n^2]]]]] First /@ Select[Partition[Range[0, 6000]^2, 2, 1], Intersection @@ IntegerDigits /@ # == {} &] (* Jayanta Basu, Aug 06 2013 *)
Extensions
Edited by Dean Hickerson and Francois Jooste (phukraut(AT)hotmail.com), Mar 19 2002
Comments