login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Position of first occurrence of n in A072347.
2

%I #30 Oct 27 2023 22:03:01

%S 0,3,7,27,15,427,55,31,215,219,111,119,63,431,443,471,439,223,239,

%T 1879,127,1719,863,1755,891,887,879,3423,447,495,479,3451,3447,255,

%U 3439,3503,1727,27355,1967,1787,1775,14167,1783,1759,1911,1903,895,7855,991,959,6907,6895,7087,55983,511,7099,6879,14043,7007,3455

%N Position of first occurrence of n in A072347.

%C a(n) == 3 (mod 4) for n > 1, since A072347(2k) = A072347(floor(k/2)) and A072347(4k+1) = A072347(2k+1). - _Robert Israel_, May 04 2016

%H Alois P. Heinz, <a href="/A272530/b272530.txt">Table of n, a(n) for n = 1..10000</a> (first 3341 terms from Robert Israel)

%H Rémy Sigrist, <a href="/A272530/a272530.png">Colored logarithmic scatterplot of a(n) for n = 1..10000</a> (where the color is function of the Hamming weight of a(n))

%p # using procedure a from A072347

%p R[1]:= 0:

%p for n from 3 to 100000 by 4 do

%p v:= a(n);

%p if not assigned(R[v]) then R[v]:= n

%p fi

%p od:

%p for n from 1 while assigned(R[n]) do od:

%p seq(R[i],i=1..n-1); # _Robert Israel_, May 04 2016

%t Block[{c, s}, c[w_] := With[{n = Length@ w}, Which[n == 0, 1, n == 1, First@ w, True, Last[w] c[Most@ w] + c[Most@ Most@ w]]]; s = {1}~Join~Array[c[IntegerDigits[#, 2]] &, 10^4]; TakeWhile[Array[-1 + FirstPosition[s, #][[1]] &, 50], IntegerQ]] (* _Michael De Vlieger_, Jan 20 2018, after _Jean-François Alcover_ at A072347 *)

%Y Cf. A072347.

%K nonn,look

%O 1,2

%A _Jeffrey Shallit_, May 02 2016