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.

A213258 Positive integers that are not in A213257.

This page as a plain text file.
%I A213258 #20 Feb 18 2025 08:59:06
%S A213258 4,12,20,28,32,36,44,52,60,68,76,84,92,96,100,108,116,124,132,140,148,
%T A213258 156,160,164,172,180,188,196,204,212,220,224,228,236,244,252,256,260,
%U A213258 268,276,284,288,292,300,308,316,324,332,340,348,352,356,364,372,380,388,396,404,412,416,420,428,436,444,452,460,468,476,480,484,492,500
%N A213258 Positive integers that are not in A213257.
%C A213258 Conjecture. The terms of this sequence are given by the positions of 2 in the fixed-point of the morphism 0 -> 01, 1 -> 02, 2 -> 03, 3 -> 01 (see A191255). (This has been confirmed for over 5000 terms of A213257.) To illustrate, the fixed-point of the indicated morphism is {0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,1,0,1,0,2,0,...} and 2 occurs at positions {4,12,20,...}, integers in this sequence but missing from A213257.
%C A213258 It appears that the terms of this sequence are all of the form of 4 times an odd integer multiplied by a nonnegative power of 8.
%C A213258 The above two conjectures are correct. This is indeed positions of 2 in A191255, and numbers of the form 2^(3t+2)*s where s is an odd number. - _Jianing Song_, Sep 21 2018
%C A213258 The asymptotic density of this sequence is 1/7. - _Amiram Eldar_, May 31 2024
%F A213258 a(n) = 2*A067368(n) = 4*A191257(n). - _Amiram Eldar_, May 31 2024
%t A213258 Select[Range[500], Mod[IntegerExponent[#, 2], 3] == 2 &] (* _Amiram Eldar_, May 31 2024 *)
%o A213258 (PARI) is(n) = valuation(n, 2) % 3 == 2; \\ _Amiram Eldar_, May 31 2024
%o A213258 (Python)
%o A213258 def A213258(n):
%o A213258     def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3))
%o A213258     m, k = n, f(n)
%o A213258     while m != k: m, k = k, f(k)
%o A213258     return m<<2 # _Chai Wah Wu_, Feb 17 2025
%Y A213258 Cf. A067368, A191255, A191257, A213257.
%K A213258 nonn
%O A213258 1,1
%A A213258 _John W. Layman_, Jun 07 2012