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!)
A210589 Numbers which, when divided by their first digit, have their last digit as remainder. 1

%I #32 Jan 02 2023 12:30:48

%S 10,20,21,30,31,32,40,41,42,43,50,51,52,53,54,60,61,62,63,64,65,70,71,

%T 72,73,74,75,76,80,81,82,83,84,85,86,87,90,91,92,93,94,95,96,97,98,

%U 100,110,120,130,140,150,160,170,180,190,200,201,210,211,220,221,230,231,240,241

%N Numbers which, when divided by their first digit, have their last digit as remainder.

%C Coincides with A071590 up to the 79th term, A071590(79)=310 is not in this sequence.

%C _Charles R Greathouse IV_ observes that this is an automatic sequence in the terminology of Allouche & Shallit.

%C See A210582 for the obvious "symmetric" counterpart: first digit = x mod last digit. - _M. F. Hasler_, Jan 14 2014

%H Vincenzo Librandi, <a href="/A210589/b210589.txt">Table of n, a(n) for n = 1..7000</a>

%H Charles R Greathouse IV, in reply to E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2012-March/016609.html">Re: Divided by first digit, have last digit as remainder</a>, SeqFan list, Mar 21 2012

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%t ldrQ[n_]:=Module[{idn=IntegerDigits[n],f,l},f=First[idn];l=Last[idn];Mod[n,f]==l]; Select[Range[10000],ldrQ] (* _Harvey P. Dale_, Mar 21 2012 *)

%o (PARI) is_A210589(x)=x%(x\10^(#Str(x)-1))==x%10

%o (Magma) [ n: n in [1..249] | n mod d[#d] eq d[1] where d is Intseq(n) ]; // _Bruno Berselli_, Mar 23 2012

%o (Python)

%o def ok(n): s = str(n); return n > 0 and n%int(s[0]) == int(s[-1])

%o print([k for k in range(242) if ok(k)]) # _Michael S. Branicky_, Oct 20 2021

%K nonn,base,easy

%O 1,1

%A _Eric Angelini_ (idea) and _M. F. Hasler_, Mar 23 2012

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 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)