login
The OEIS is supported by the many generous donors to the OEIS 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
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
Sequence in context: A093807 A088642 A251126 * A158794 A204364 A235180
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)