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!)
A327119 Sequence obtained by swapping each (k*(2n))-th element of the nonnegative integers with the (k*(2n+1))-th element, for all k>0 in ascending order, omitting the first term. 3

%I #35 Jul 17 2023 15:17:58

%S 0,1,3,2,7,4,8,6,14,5,15,10,20,12,17,9,34,16,27,18,31,13,29,22,47,19,

%T 39,11,48,28,44,30,76,21,51,26,62,36,53,25,69,40,55,42,75,24,65,46,97,

%U 35,63,33,94,52,71,43,95,37,87,58,90,60,89,32,167,50,84

%N Sequence obtained by swapping each (k*(2n))-th element of the nonnegative integers with the (k*(2n+1))-th element, for all k>0 in ascending order, omitting the first term.

%C The first term must be omitted because it does not converge.

%C Start with the sequence of nonnegative integers [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...].

%C Swap all pairs specified by k=1, resulting in [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, ...], so the first term of the final sequence is 0 (No swaps for k>1 will affect this term).

%C Swap all pairs specified by k=2, resulting in [3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, ...], so the second term of the final sequence is 1 (No swaps for k>2 will affect this term).

%C Swap all pairs specified by k=3, resulting in [2, 0, 1, 3, 7, 4, 8, 6, 11, 5, 9, ...], so the third term of the final sequence is 3 (No swaps for k>3 will affect this term).

%C Continue for all values of k.

%C a(n) is equivalent to -A327093(-n), if A327093 is extended to all integers.

%C It appears that n is an odd prime number iff a(n+1)=n-1. If true, is there a formal analogy with the Sieve of Eratosthenes (by swapping instead of marking terms), or is this another type of sieve? - _Jon Maiga_, May 31 2021

%H Jennifer Buckley, <a href="/A327119/b327119.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A004442(A327420(n)) (conjectured). - _Jon Maiga_, May 31 2021

%o (Go)

%o func a(n int) int {

%o for k := n; k > 0; k-- {

%o if n%k == 0 {

%o if (n/k)%2 == 0 {

%o n = n + k

%o } else {

%o n = n - k

%o }

%o }

%o }

%o return n

%o }

%Y Cf. A004442, A327093, A327420.

%Y Inverse: A327120.

%K nonn

%O 1,3

%A _Jennifer Buckley_, Sep 13 2019

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