cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A073675 Rearrangement of natural numbers such that a(n) is the smallest proper divisor of n not included earlier but if no such divisor exists then a(n) is the smallest proper multiple of n not included earlier, subject always to the condition that a(n) is not equal to n.

This page as a plain text file.
%I A073675 #45 Aug 08 2025 12:30:37
%S A073675 2,1,6,8,10,3,14,4,18,5,22,24,26,7,30,32,34,9,38,40,42,11,46,12,50,13,
%T A073675 54,56,58,15,62,16,66,17,70,72,74,19,78,20,82,21,86,88,90,23,94,96,98,
%U A073675 25,102,104,106,27,110,28,114,29,118,120,122,31,126,128,130,33,134,136
%N A073675 Rearrangement of natural numbers such that a(n) is the smallest proper divisor of n not included earlier but if no such divisor exists then a(n) is the smallest proper multiple of n not included earlier, subject always to the condition that a(n) is not equal to n.
%C A073675 The parity of the sequence is E,D,E,E,E,D,E,E,E,D,E,E,E,D,E,E,E,D,E,E,E,D,..., that is, an D followed by three E's from the second term onwards.
%C A073675 Closely related to A035263: if A035263(n) = 1, a(n) = 2n; otherwise a(n)=n/2. - _Franklin T. Adams-Watters_, Feb 02 2006
%C A073675 This permutation is self-inverse. This is the case r=2 of sequences where a(n)=floor(n/r) if floor(n/r)>0 and not already in the sequence, a(n) = floor(n*r) otherwise. All such sequences (for r>=1) are permutations of the natural numbers. - _Franklin T. Adams-Watters_, Feb 06 2006
%C A073675 Take the list of positive integers L. At each step n swap L(n) with L(2*L(n)). - _Ali Sada_, Jun 18 2025
%H A073675 Alois P. Heinz, <a href="/A073675/b073675.txt">Table of n, a(n) for n = 1..1000</a>
%H A073675 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A073675 If valuation(n,2) is even, a(n) = 2n; otherwise a(n)=n/2, where valuation(n,2) = A007814(n) is the exponent of the highest power of 2 dividing n. - _Franklin T. Adams-Watters_, Feb 06 2006, Jul 31 2009
%F A073675 a(k*2^m) = k*2^(m+(-1)^m), m >= 0, odd k >= 1. - _Carl R. White_, Aug 23 2010
%p A073675 a:= proc(n) local i, m; m:=n;
%p A073675       for i from 0 while irem(m, 2, 'r')=0 do m:=r od;
%p A073675       m*2^`if`(irem(i, 2)=1, i-1, i+1)
%p A073675     end:
%p A073675 seq(a(n), n=1..80);  # _Alois P. Heinz_, Feb 10 2014
%t A073675 a[n_] := Module[{i, m = n}, For[i = 0, {q, r} = QuotientRemainder[m, 2]; r == 0, i++, m = q]; m*2^If[Mod[i, 2] == 1, i-1, i+1]]; Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Jun 10 2015, after _Alois P. Heinz_ *)
%o A073675 (GNU bc) scale=0;for(n=1;n<=100;n++){m=0;for(k=n;!k%2;m++)k/=2;k*2^(m+(-1)^m)} /* _Carl R. White_, Aug 23 2010 */
%o A073675 (PARI) a(n) = if (valuation(n, 2) % 2, n/2, 2*n); \\ _Michel Marcus_, Mar 17 2018
%o A073675 (Python)
%o A073675 def A073675(n): return n>>1 if (~n & n-1).bit_length()&1 else n<<1 # _Chai Wah Wu_, Aug 08 2025
%Y A073675 Matches A118967 for all non-powers-of-two. - _Carl R. White_, Aug 23 2010
%Y A073675 Row 2 and column 2 of A059897.
%K A073675 nonn
%O A073675 1,1
%A A073675 _Amarnath Murthy_, Aug 11 2002
%E A073675 More terms and comment from _Franklin T. Adams-Watters_, Feb 06 2006, Jul 31 2009
%E A073675 More terms from _Franklin T. Adams-Watters_, Feb 06 2006
%E A073675 Edited by _N. J. A. Sloane_, Jul 31 2009
%E A073675 Typo fixed by _Charles R Greathouse IV_, Apr 29 2010