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!)
A290019 Sort the positive integers according to 3 keys, which are, in order of priority, number of digits, omega (A001221), and the number itself. 2

%I #26 Jul 28 2017 10:18:16

%S 1,2,3,4,5,7,8,9,6,11,13,16,17,19,23,25,27,29,31,32,37,41,43,47,49,53,

%T 59,61,64,67,71,73,79,81,83,89,97,10,12,14,15,18,20,21,22,24,26,28,33,

%U 34,35,36,38,39,40,44,45,46,48,50,51,52,54,55,56,57,58,62,63

%N Sort the positive integers according to 3 keys, which are, in order of priority, number of digits, omega (A001221), and the number itself.

%H Alois P. Heinz, <a href="/A290019/b290019.txt">Table of n, a(n) for n = 1..9999</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%t Table[SortBy[Range[10^(n - 1), 10^n - 1], PrimeNu], {n, 2}] // Flatten (* _Michael De Vlieger_, Jul 20 2017 *)

%o (PARI) upto(t10nm1) = {my(v, res = []); for(i=1, t10nm1, res = concat(res, vecsort(vector(9*10^(i-1), j, k=j+10^(i-1)-1;[omega(k),k]))));vector(#res, i, res[i][2])}

%Y Cf. A001221, A055642, A290020.

%K nonn,base

%O 1,2

%A _David A. Corneth_, Jul 19 2017

%E Definition clarified by _Giovanni Resta_, Jul 27 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 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)