|
| |
|
|
A080438
|
|
Smallest square obtained by inserting one or more digits between every pair of consecutive digits of n^2.
|
|
0
| |
|
|
1, 4, 9, 196, 225, 3136, 4489, 6084, 841, 10000, 10201, 10404, 10609, 12996, 27225, 27556, 27889, 39204, 39601, 40000, 40401, 40804, 54289, 54756, 616225, 617796, 71289, 71824, 89401, 90000, 90601, 10036224, 1108809, 10150596, 1525225, 1920996
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
COMMENTS
| If n^2 has k digits, there are (k-1) places where digit insertion takes place, and a(n) contains at least 2k-1 digits.
|
|
|
PROG
| (PARI) { a(n) = m=Vec(Str(n^2)); r=0; k=#m-1; while(!r, forvec(w=vector(#m-2, i, [1, k-1]), v=vector(#w+1, i, if(i<=#w, w[i], k)-if(i>1, w[i-1])); forvec(u=vector(#v, i, [0, 10^v[i]-1]), t=m[1]; for(i=1, #v, if(#Str(u[i])<v[i], t=concat(t, concat(vector(v[i]-#Str(u[i]), j, "0"))); ); t=concat([t, Str(u[i]), m[i+1]]); ); t=eval(t); if( issquare(t) && (r==0 || t<r), r=t); ); , 2); k++; ); r } \\ From Max Alekseyev
|
|
|
CROSSREFS
| Cf. A080436, A080437.
Sequence in context: A084009 A029738 A067072 * A029999 A006280 A202463
Adjacent sequences: A080435 A080436 A080437 * A080439 A080440 A080441
|
|
|
KEYWORD
| base,nonn,changed
|
|
|
AUTHOR
| Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Feb 21 2003
|
|
|
EXTENSIONS
| More terms from Max Alekseyev (maxale(AT)gmail.com), Feb 11 2012
|
| |
|
|