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!)
A287478 Positive numbers m with the property that m is the least cyclic permutation of its digits with the same number of digits as m. 1

%I #23 Oct 25 2019 12:31:16

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,

%T 28,29,30,33,34,35,36,37,38,39,40,44,45,46,47,48,49,50,55,56,57,58,59,

%U 60,66,67,68,69,70,77,78,79,80,88,89,90,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120

%N Positive numbers m with the property that m is the least cyclic permutation of its digits with the same number of digits as m.

%C First differs from A179239 at n = 83; a(83) = 120 and A179239(83) = 122. This sequence is a supersequence of A179239.

%C If there is a zero digit, then we do not consider the cyclic shift which begins with the zero digit.

%C The number 0 should also be in this list. The initial digit of any term must be its smallest nonzero digit. - _M. F. Hasler_, Oct 18 2019

%H David A. Corneth, <a href="/A287478/b287478.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Range@ 120, Function[d, First@ Sort@ Map[FromDigits, DeleteCases[ NestList[RotateLeft, d, Length@ d - 1], _?(First@ # == 0 &)]] == #]@ IntegerDigits@ # &] (* _Michael De Vlieger_, May 27 2017 *)

%o (PARI) is(n) = my(d=digits(n), v=vector(#d), no=n, nn=n, l=List(n)); for(i=2,#d, no = nn\10; no = no+(nn-no*10)*10^(#d-1); if(#digits(no)==#d,listput(l, no)); nn=no); listsort(l); n==l[1]

%o is(n) = {my(d = digits(n), dd = concat(d, d)); for(i=2,#d, c=vector(#d, j, dd[i+j-1]); if(fromdigits(c) < n, if(c[1]!=0, return(0)))); 1}

%o (PARI) is_A287478(n,D=digits(n))={!for(i=2,#D,((D[i]<D[1] && D[i])|| (D[i]==D[1]&&[1,10^(i-1)]*divrem(n,10^(#D-i+1))<n))&& return)} \\ _M. F. Hasler_, Oct 18 2019

%Y Cf. A179239, A287198.

%K nonn,base

%O 1,2

%A _David A. Corneth_, May 25 2017

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