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.

A230892 Terms of A230891 written in base 10: the binary expansions of a(n) and a(n+1) taken together can be rearranged to form a palindrome.

This page as a plain text file.
%I A230892 #41 Mar 02 2019 02:52:03
%S A230892 0,3,1,2,4,7,8,5,6,9,10,12,15,16,11,13,14,17,18,20,23,24,27,29,30,32,
%T A230892 19,21,22,25,26,28,31,33,34,36,39,40,43,45,46,48,51,53,54,57,58,60,63,
%U A230892 64,35,37,38,41,42,44,47,49,50,52,55,56,59,61,62,65,66,68,71
%N A230892 Terms of A230891 written in base 10: the binary expansions of a(n) and a(n+1) taken together can be rearranged to form a palindrome.
%C A230892 See A230891 for precise definition.
%C A230892 Just as for A228407, we can ask: does every number appear? The answer is yes - see the Comments in A228407.
%C A230892 The difference d(n)=a(n)-n increases from d(3*2^(k-2)+2) = 1-2^(k-2) to d(3*2^(k-1)+1) = 1-2^(k-1), going through 0 at n=2^k+1 and n=2^k+2, cf. examples. - _M. F. Hasler_, Nov 12 2013
%C A230892 From _Robert G. Wilson v_, Nov 15 2013: (Start)
%C A230892 Beginning with k=3, each "grouping" of ever increasing terms, begins at 2^k + 3 and runs up to 2^(k+2) and includes 3*2^(k-1) terms.
%C A230892 Indices of powers of 2 occur at: 2, 3, 4, 6, 13, 25, 49, 97, 193, 385, 769, 1537, ..., which, except for 2, 3 & 6, is A181565: 3*2^n + 1.
%C A230892 When the index equals the term: 0, 4, 9, 10, 17, 18, 33, 34, 65, 66, 129, 130, 257, 258, 513, 514, 1025, 1026, 2049, 2050, ..., .
%C A230892 Parity of a(n) beginning at n=0: 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, ..., . (End)
%H A230892 Chai Wah Wu, <a href="/A230892/b230892.txt">Table of n, a(n) for n = 0..30000</a> (first 2051 terms from Robert G. Wilson v)
%H A230892 Robert G. Wilson v, <a href="/A230892/a230892.pdf">Graph of the first 1025 terms</a>
%e A230892 From _M. F. Hasler_, Nov 12 2013: (Start)
%e A230892 Let d(n)=a(n)-n, i.e., a(n)=n+d(n). Then we have, after initial values d(0..8)=(0, 2, -1, -1, 0, 2, 2, -2, -2), the
%e A230892 following pattern: d(9) = d(10) = 0, ..., d(13) = 3,
%e A230892 d(14) = -3, ..., d(17) = d(18) = 0, ..., d(25) = 7;
%e A230892 d(26) = -7, ..., d(33) = d(34) = 0, ..., d(49) = 15,
%e A230892 d(50) = -15, ..., d(65) = d(66) = 0, ..., d(97) = 31,
%e A230892 d(98) = -31, ..., d(129) = d(130) = 0, ..., d(193) = 63,
%e A230892 d(194) = -63,..., d(257) = d(258) = 0, ... (End)
%o A230892 (PARI) {u=0; a=0; La=1; ha=0/*hack*/; for(n=1, 99, u+=1<<a; print1(a", "); L=1; for(k=1, 9e9, bittest(u, k)&&next; while(k>=2^L,L++); bittest(ha+h=hammingweight(k),0)&&!bittest(La+L,0)&&next; !a&&k<3&&next; a=k; ha=h; La=L; break))} \\ _M. F. Hasler_, Nov 11 2013
%o A230892 (Python)
%o A230892 from collections import Counter
%o A230892 A230892_list, l, s, b = [0, 3], Counter('11'), 1, {3}
%o A230892 for _ in range(30001):
%o A230892     i = s
%o A230892     while True:
%o A230892         if i not in b:
%o A230892             li, o = Counter(bin(i)[2:]), 0
%o A230892             for d in (l+li).values():
%o A230892                 if d % 2:
%o A230892                     if o > 0:
%o A230892                         break
%o A230892                     o += 1
%o A230892             else:
%o A230892                 A230892_list.append(i)
%o A230892                 l = li
%o A230892                 b.add(i)
%o A230892                 while s in b:
%o A230892                     b.remove(s)
%o A230892                     s += 1
%o A230892                 break
%o A230892         i += 1 # _Chai Wah Wu_, Jun 19 2016
%Y A230892 Cf. A230891, A228407.
%K A230892 nonn,base
%O A230892 0,2
%A A230892 _N. J. A. Sloane_, Nov 11 2013