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.

A380739 For n = 2^k (k>=0), a(n) = n. Otherwise a(n) != n is the smallest number not yet in the sequence having the same binary weight as n and such that gcd(n,a(n)) > 1.

This page as a plain text file.
%I A380739 #9 Feb 03 2025 21:32:52
%S A380739 1,2,6,4,10,3,14,8,12,5,22,9,26,7,27,16,34,20,38,18,28,11,46,33,35,13,
%T A380739 15,21,58,39,62,32,24,17,25,40,74,19,30,36,82,44,86,42,51,23,94,66,56,
%U A380739 52,45,50,106,57,110,49,54,29,118,75,122,31,111,64,80,48,134
%N A380739 For n = 2^k (k>=0), a(n) = n. Otherwise a(n) != n is the smallest number not yet in the sequence having the same binary weight as n and such that gcd(n,a(n)) > 1.
%C A380739 Similar definition to A380728, conjectured to be a permutation of the natural numbers, with primes in order.
%H A380739 Michael De Vlieger, <a href="/A380739/b380739.txt">Table of n, a(n) for n = 1..16384</a>
%H A380739 Michael De Vlieger, <a href="/A380739/a380739.png">Log log scatterplot of a(n)</a>, n = 1..2^14.
%F A380739 a(a(n)) = n for all n; p a prime implies a(p) = 2*p.
%t A380739 nn = 120; c[_] := False; u = 1;
%t A380739 f[x_] := f[x] = DigitCount[x, 2, 1];
%t A380739 Reap[Do[w = f[n]; k = u;
%t A380739   If[w == 1,
%t A380739     k = n,
%t A380739     While[Or[c[k], CoprimeQ[k, n], w != f[k], k == n], k++]];
%t A380739   Sow[k]; c[k] = True;
%t A380739 If[k == u, While[c[u], u++]], {n, nn}] ][[-1, 1]] (* _Michael De Vlieger_, Feb 02 2025 *)
%Y A380739 Cf. A000120, A005940, A380728.
%K A380739 nonn,base
%O A380739 1,2
%A A380739 _David James Sycamore_, Jan 31 2025