login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078211 Smallest multiple of n^2 beginning and ending in n, or 0 if no such multiple exists. 1
1, 212, 333, 464, 525, 6156, 7007, 8128, 9639, 0, 11011, 122112, 13013, 0, 0, 162816, 1720417, 0, 1905719, 0, 212121, 0, 2320723, 244224, 25625, 0, 2743227, 287728, 2917429, 0, 3143431, 325632, 3372633, 0, 0, 3617136, 373737, 0, 393939, 0, 4136941 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..41.

PROG

(PARI) { a(n) = local(l, m); l=#Str(n); m=valuation(n, 2); if(m>0 && m<l, return(0)); m=valuation(n, 5); if(m>0 && m<l, return(0)); for(j=0, l-1, if(n%10^(l-j)==n\10^j && (n*10^j + n%10^j)%n^2==0, return(n*10^j + n%10^j)); ); if((10^l+1)%n==0, return(n*(10^l+1))); m=0; g=gcd(n^2, 10^l); until(#Str(t)<=m, m++; t=lift(Mod(-n*(10^(m+l)+1)/g, n^2/g)/(10^l\g)); ); n*(10^(m+l)+1)+t*10^l } \\ Max Alekseyev, Oct 18 2008

CROSSREFS

Cf. A078208, A077209, A077210, A078212.

Sequence in context: A093807 A088642 A251126 * A158794 A204364 A235180

Adjacent sequences:  A078208 A078209 A078210 * A078212 A078213 A078214

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Nov 22 2002

EXTENSIONS

a(11) and up from Max Alekseyev, Oct 18 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 2 15:37 EDT 2020. Contains 335402 sequences. (Running on oeis4.)