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

%I #8 Jun 10 2018 20:59:38

%S 1,212,333,464,525,6156,7007,8128,9639,0,11011,122112,13013,0,0,

%T 162816,1720417,0,1905719,0,212121,0,2320723,244224,25625,0,2743227,

%U 287728,2917429,0,3143431,325632,3372633,0,0,3617136,373737,0,393939,0,4136941

%N Smallest multiple of n^2 beginning and ending in n, or 0 if no such multiple exists.

%o (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

%Y Cf. A078208, A077209, A077210, A078212.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Nov 22 2002

%E a(11) and up from _Max Alekseyev_, Oct 18 2008

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 24 15:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)