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!)
A186436 Smallest number that equals n times its last digit, or 0 if no such number exists. 1

%I #12 Sep 08 2022 08:45:55

%S 1,0,15,0,25,12,35,0,45,0,11,0,65,0,75,32,85,0,95,0,21,0,115,0,125,52,

%T 135,0,145,0,31,0,165,0,175,72,185,0,195,0,41,0,215,0,225,92,235,0,

%U 245,0,51,0,265,0,275,112,285,0,295,0,61,0,315,0,325,132,335,0,345,0,71,0

%N Smallest number that equals n times its last digit, or 0 if no such number exists.

%e a(7) = 35 because last digit of 35 is 5 and 7*5 = 35, and there is no number < 35 that satisfies the condition.

%p with(numtheory):for k from 1 to 100 do:id:=0:for n from 1 to 2000 while(id=0)

%p do:x:=irem(n,10):if n=k*x then n0:=n:id:=1:else fi:od:if id=1 then printf(`%d,

%p `,n0):else printf(`%d, `,0):fi:od:

%o (Magma) A186436:=function(n); for j in [1..9] do a:=n*j; if j eq Intseq(a)[1] then return a; end if; end for; return 0; end function; [ A186436(n): n in [1..100] ]; // _Klaus Brockhaus_, Feb 22 2011

%K nonn,easy,base

%O 1,3

%A _Michel Lagneau_, Feb 21 2011

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 September 6 08:07 EDT 2024. Contains 375712 sequences. (Running on oeis4.)