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.

Showing 1-10 of 12 results. Next

A206921 Rank of the n-th binary palindrome. The minimal number of iterations A206915(A206915(...A206915(A006995(n))...)) such that the result is not a binary palindrome, a(3)=1.

Original entry on oeis.org

2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Hieronymus Fischer, Mar 12 2012

Keywords

Comments

The number of iterations such that A006995(n) = A006995(A006995(A006995(...(A206922(n))...))) [For n<>3].

Examples

			a(1)=2, since A006995(1)=0=A006995(A006995(2)) [==> 2 iterations; 2 is not a binary palindrome];
a(3)=1 by definition;
a(4)=1, since A006995(4)=5=A006995(4) [==> 1 iteration; 4 is not a binary palindrome];
a(7)=3, since A006995(7)=15=A006995(A006995(A006995(4))) [==> 3 iterations; 4 is not a binary palindrome];
		

Crossrefs

Programs

Formula

a(n)=k, where k can be determined by the following iteration: set k=0, p(0)=A006995(n). Repeat while A178225(p(k))==1, set k=k+1, p(k)=A206915(p(k-1)) end repeat [for n<>3].
Recursion for n<>3:
Case 1: a(n)=1, if n is not a binary palindrome;
Case 2: a(n)=a(A206915(n))+1, else.
Formally: a(n)=if (A178225(n)==0) then 1 else a(A206915(n))+1

A206913 Greatest binary palindrome <= n; the binary palindrome floor function.

Original entry on oeis.org

0, 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 9, 9, 9, 9, 15, 15, 17, 17, 17, 17, 21, 21, 21, 21, 21, 21, 27, 27, 27, 27, 31, 31, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 45, 45, 45, 45, 45, 45, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 63, 63, 65, 65, 65, 65
Offset: 0

Views

Author

Hieronymus Fischer, Feb 13 2012

Keywords

Comments

Also the greatest binary palindrome < n + 1;
For n > 0, a(n-1) is the greatest binary palindrome < n.

Examples

			a(0) = 0 since 0 is the greatest binary palindrome <= 0;
a(1) = 1 since 1 is the greatest binary palindrome <= 1;
a(2) = 1 since 1 is the greatest binary palindrome <= 2;
a(3) = 3 since 3 is the greatest binary palindrome <= 3.
		

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • Haskell
    a206913 n = last $ takeWhile (<= n) a006995_list
    -- Reinhard Zumkeller, Feb 27 2012

Formula

Let n > 2, p = 1 + 2*floor((n-1)/2), m = floor(log_2(p)), q = floor((m+1)/2), s = floor(log_2(p-2^q)),
F(x, r) = floor(x/2^q)*2^q + Sum_{k = 0...q - 1} (floor(x/2^(r-k)) mod 2)*2^k;
If F(p, m) <= n then a(n) = F(p, m), otherwise a(n) = F(p-2^q, s).
By definition: F(p, m) = floor(p/2^q)*2^q + A030101(p) mod 2^q; also: F(p-2^q, s) = floor((p-2^q)/2^q)*2^q + A030101(p-2^q) mod 2^q; [Edited and corrected by Hieronymus Fischer, Sep 08 2018]
a(n) = A006995(A206915(n));
a(n) = A006995(A206915(A206914(n+1))-1);
a(n) = A006995(A206916(A206914(n+1))-1).

A206914 Least binary palindrome >= n; the binary palindrome ceiling function.

Original entry on oeis.org

0, 1, 3, 3, 5, 5, 7, 7, 9, 9, 15, 15, 15, 15, 15, 15, 17, 17, 21, 21, 21, 21, 27, 27, 27, 27, 27, 27, 31, 31, 31, 31, 33, 33, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 51, 51, 51, 51, 51, 51, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 73, 73
Offset: 0

Views

Author

Hieronymus Fischer, Feb 15 2012

Keywords

Comments

For n > 0 also the least binary palindrome > n - 1;
a(n+1) is the least binary palindrome > n

Examples

			a(0) = 0 since 0 is the least binary palindrome >= 0;
a(1) = 1 since 1 is the least binary palindrome >= 1;
a(2) = 3 since 3 is the least binary palindrome >= 2;
a(5) = 5 since 5 is the least binary palindrome >= 5;
		

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • Haskell
    a206914 n = head $ dropWhile (< n) a006995_list
    -- Reinhard Zumkeller, Feb 27 2012

Formula

a(n) = A006995(A206916(n));
a(n) = A006995(A206916(A206913(n-1))+1);
a(n) = A006995(A206915(A206913(n-1))+1);

A178225 Characteristic function of A006995 (binary palindromes).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Jeremy Gardiner, May 23 2010

Keywords

Comments

a(n)=1 if n is in A006995, a(n)=0 otherwise.
For n<43, identical to parity of A175096.
Comment by Franklin T. Adams-Watters: (Start)
Any permutation of the runs of n gives another such permutation when reversed. This pairs up all non-palindromic permutations of the runs of n. Thus the parity of A175096(n) is the parity of the number of palindromic run-permutations of n. For small n, this is 1 when n is a binary palindrome, and 0 otherwise.
The first exception is 43, binary 101011, which has a nontrivial palindromic run-permutation 45, binary 101101. Another kind of exception occurs first for n = 365, binary 101101101, which is a palindrome, but has another palindromic run-permutation 427, binary 110101011. (End)
Given an index n such that a(n)=1, then the following A164126(A206915(n))-1 terms will be 0. n'=A164126(A206915(n)) is the next term with a(n')=1. Therefore, if we subtract 1 from each term of A164126, we get the sequence of run lengths of 0's. - Hieronymus Fischer, Feb 19 2012.
Given an index n such that a(n)=0, then p=A206913(n) is the greatest index pA206914(n) is the least index q>n such that a(q)=1, which implies a(k)=0 for all k with n<=kHieronymus Fischer, Feb 19 2012.
Binary palindromes are distributed symmetrically with respect to threefold multiples of powers of 2. This becomes obvious by the generating function g(x) below. Example for the resulting factors of x^(3*2^5)=x^96: the factors are x^q and x^(-q) for q=3,11,23,31. Thus, the palindromes are 96+3, 96-3, 96+11, 96-11, 96+23, 96-23, 96+31, 96-31. The respective number of palindromes with this property is 2^(floor(m/2)), where m is the exponent of the corresponding power of 2. - Hieronymus Fischer, Apr 04 2012

Examples

			a(3)=1, since 3 is binary palindromic;
a(4)=0, since 4 is not palindromic.
		

Crossrefs

Cf. A136522. See A206915 for the partial sums.

Programs

  • Haskell
    a178225 n = fromEnum $ n == a030101 n  -- Reinhard Zumkeller, Oct 21 2011
    
  • Mathematica
    A178225[n_]:=Boole[PalindromeQ[IntegerDigits[n,2]]];
    Array[A178225,100,0] (* Paolo Xausa, Oct 15 2023 *)
  • PARI
    a(n) = my(b=binary(n)); b == Vecrev(b); \\ Michel Marcus, Feb 13 2019
    
  • Python
    a187225 = lambda n: int(bin(n)[2:] == bin(n)[:1:-1]) # David Radcliffe, May 05 2023

Formula

a(A006995(n)) = 1; a(A154809(n)) = 0. - Reinhard Zumkeller, Oct 21 2011
a(n) = if A030101(n) = n then 1, otherwise 0. - Reinhard Zumkeller, Jan 17 2012
a(n) = 1 - (A206916(n) - A206915(n)). - Hieronymus Fischer, Feb 18 2012
G.f.: g(x) = 1 + x + x^3 + Sum{j>=1} x^(3*2^j)*(f_j(x)+f_j(1/x)), where the f_j(x) are defined as follows:
f_1(x)=x, and for j > 1,
f_j(x) = x^3*Product_{k=1..floor((j-1)/2)} (1+x^b(j,k)), where b(j,k) = 2^(floor((j-1)/2)-k)*((3+(-1)^j)*2^(2*k+1)+4) for k > 1, and b(j,1) = (2+(-1)^j)*2^(floor((j-1)/2)+1). The first explicit terms of this g.f. are
g(x) = 1 + x + x^3 + (f_1(x) + f_1(1/x))*x^6 + (f_2(x) + f_2(1/x))*x^12 + (f_3(x)+f_3(1/x))*x^24 + (f_4(x) + f_4(1/x))*x^48 + (f_5(x) + f_5(1/x))*x^96 + ... = 1 + x + x^3 + (x+1/x)*x^6 + (x^3+1/x^3)*x^12 + (x^3*(1+x^4) + (1+1/x^4)/x^3)*x^24 + (x^3*(1+x^12) + (1+1/x^12)/x^3)*x^48 + (x^3*(1+x^8)(1+x^20) + (1+1/x^20)(1+1/x^8)/x^3)*x^96 + ... - Hieronymus Fischer, Apr 02 2012

A154809 Numbers whose binary expansion is not palindromic.

Original entry on oeis.org

2, 4, 6, 8, 10, 11, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88
Offset: 1

Views

Author

Omar E. Pol, Jan 24 2009

Keywords

Comments

Complement of A006995.
The (a(n)-n+1)-th binary palindrome equals the greatest binary palindrome <= a(n). The corresponding formula identity is: A006995(a(n)-n+1)=A206913(a(n)). - Hieronymus Fischer, Mar 18 2012
A145799(a(n)) < a(n). - Reinhard Zumkeller, Sep 24 2015

Examples

			a(1)=2, since 2 = 10_2 is not binary palindromic.
		

Crossrefs

Programs

  • Haskell
    a154809 n = a154809_list !! (n-1)
    a154809_list = filter ((== 0) . a178225) [0..]
    
  • Magma
    [n: n in [0..600] | not (Intseq(n, 2) eq Reverse(Intseq(n, 2)))]; // Vincenzo Librandi, Jul 05 2015
    
  • Maple
    ispali:= proc(n) local L;
    L:= convert(n,base,2);
    ListTools:-Reverse(L)=L
    end proc:
    remove(ispali, [$1..1000]); # Robert Israel, Jul 05 2015
  • Mathematica
    palQ[n_Integer, base_Integer]:=Module[{idn=IntegerDigits[n, base]}, idn==Reverse[idn]]; Select[Range[1000], ! palQ[#, 2] &] (* Vincenzo Librandi, Jul 05 2015 *)
  • PARI
    isok(n) = binary(n) != Vecrev(binary(n)); \\ Michel Marcus, Jul 05 2015
    
  • Python
    def A154809(n):
        def f(x): return n+(x>>(l:=x.bit_length())-(k:=l+1>>1))-(int(bin(x)[k+1:1:-1],2)>(x&(1<Chai Wah Wu, Jul 24 2024

Formula

A030101(n) != n. - David W. Wilson, Jun 09 2009
A178225(a(n)) = 0. - Reinhard Zumkeller, Oct 21 2011
From Hieronymus Fischer, Feb 19 2012 and Mar 18 2012: (Start)
Inversion formula: If d is any number from this sequence, then the index number n for which a(n)=d can be calculated by n=d+1-A206915(A206913(d)).
Explicitly: Let p=A206913(d), m=floor(log_2(p)) and p>2, then: a(n)=d+1+(((5-(-1)^m)/2) + sum(k=1...floor(m/2)|(floor(p/2^k) mod 2)/2^k))*2^floor(m/2).
Example 1: d=1000, A206913(d)=975, A206915(975)=62, hence n=1001-62=939.
Example 2: d=10^6, A206913(d)=999471, A206915(999471)=2000, hence n=1000001-2000=998001.
Recursion formulas:
a(n+1)=a(n)+1+A178225(a(n)+1)
Also:
Case 1: a(n+1)=a(n)+2, if A206914(a(n))=a(n)+1;
Case 2: a(n+1)=a(n)+1, else.
Also:
Case 1: a(n+1)=a(n)+1, if A206914(a(n))>a(n)+1;
Case 2: a(n+1)=a(n)+2, else.
Iterative calculation formula:
Let f(0):=n+1, f(j):=n-1+A206915(A206913(f(j-1)) for j>0; then a(n)=f(j), if f(j)=f(j-1). The number of necessary steps is typically <4 and is limited by O(log_2(n)).
Example 3: n=1000, f(0)=1001, f(1)=1061, f(2)=1064=f(3), hence a(1000)=1064.
Example 4: n=10^6, f(0)=10^6+1, f(1)=1001999, f(2)=1002001=f(3), hence a(10^6)=1002001.
Formula identity:
a(n) = n-1 + A206915(A206913(a(n))).
(End)

Extensions

Extended by Ray Chandler, Mar 14 2010

A206923 Number of bisections of the n-th binary palindrome bit pattern until the result is not palindromic.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 3, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Hieronymus Fischer, Mar 12 2012

Keywords

Comments

Let k=1, p(1)=A006995(n) and m(1)=number of bits in p(1); if p(k) is a binary palindrome > 1 then iterate k=k+1, m(k)=floor((m(k-1)+1)/2), p(k)=leftmost m(k) bits of p(k-1); else set a(n)=k endif.

Examples

			a(1)=a(2)=1, since A006995(1)=0 and A006995(2)=1;
a(5)=3, since A006995(5)=7=111_2 and so the iteration is 11==>11==>1;
a(9)=2, since A006995(9)=21=10101_2 and so the iteration is 10101==>101;
a(13)=2, since A006995(13)=45=101101_2 and so the iteration is 101101==>101;
a(15)=4, since A006995(15)=63=111111_2 and so the iteration is 111111==>111==>11==>1;
a(37)=3, since A006995(37)=341=101010101_2 and so the iteration is 101010101==>10101==>101;
		

Crossrefs

Programs

  • C
    /* quasi-C program fragment, omitting formal details, n>1 */
    p=n;
    p1=n+1;
    k=0;
    while (A178225(p)==1) && (p != p1)
    {
      p1=p;
      k++;
      m=int(log(p)/log(2));
      p=int(p/2^int((m+1)/2));
    }
    return k;

Formula

Recursion: define f(x)=floor(A006995(x)/2^floor(floor(log_2(A006995(x))+1)/2)), for x=1,2,3,...
Case 1: a(n)=1+a(A206915(f(n))), if f(n) is a binary palindrome;
Case 2: a(n)=1, else.
Formally: a(n)=if (A178225(f(n))==1) then a(A206915(f(n)))+1 else 1.

A206916 Index of the least binary palindrome >=n; also the "upper inverse" of A006995.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 17, 17, 17, 17, 17
Offset: 0

Views

Author

Hieronymus Fischer, Feb 17 2012

Keywords

Comments

The least m such that A006995(m)>=n;
n is palindromic iff a(n)=A206915(n);
a(n) is the number of the binary palindrome A206914(n);
if n is a binary palindrome, then A006995(a(n))=n, so a(n) is 'inverse' with respect to A006995

Examples

			a(2)=3 since 3 is the index number of the least binary palindrome >= 2;
a(5)=4 since 4 is the index number of the least binary palindrome >= 5;
a(10)=7 since A006995(7)=15>=10, but A006995(6)=9<10, and so that, 7 is the index number of least binary palindrome >= 10;
		

Crossrefs

Programs

  • Python
    def A206916(n):
        l = n.bit_length()
        k = l+1>>1
        return (n>>l-k)+(int(bin(n)[k+1:1:-1] or '0',2)<(n&(1<Chai Wah Wu, Jul 24 2024

Formula

a(n)=min(m|A006995(m)>=n);
a(A006995(n))=n;
A006995(a(n))>=n, equality holds true iff n is a binary palindrome;
Let p=A206914(n), m=floor(log_2(p)) and p>2, then:
a(n)=(((5-(-1)^m)/2) + sum_{k=1..floor(m/2)} (floor(p/2^k) mod 2)/2^k))*2^floor(m/2);
a(n)=(1/2)*((6-(-1)^m)*2^floor(m/2)-1-sum_ {k=1..floor(m/2)} (-1)^floor(p/2^k)*2^(floor(m/2)-k)));
a(n)=(5-(-1)^m)*2^floor(m/2)/2-3*sum_{k=2..floor(m/2)} floor(p/2^k)*2^floor(m/2)/2^k)+(floor(p/2)*2^floor(m/2)/2-2*floor((p/2)*2^floor(m/2))*floor((m-1)/m+1/2).
Partial sums S(n) = sum_{k=0..n} a(k):
S(n) = 1+n*a(n)-A206920(a(n)-1), valid for n>0.
G.f.: g(x)=(x+x^2+x^3+sum_{j=1..infinity} x^(3*2^j)*(f_j(x)+f_j(1/x)))/(x(1-x)), where the f_j(x) are defined as follows:
f_1(x)=x, and for j>1,
f_j(x)=x^3*product_{k=1..floor((j-1)/2)} (1+x^b(j,k)), where b(j,k)=2^(floor((j-1)/2)-k)*((3+(-1)^j)*2^(2*k+1)+4) for k>1, and b(j,1)=(2+(-1)^j)*2^(floor((j-1)/2)+1).

A217099 Binary palindromes (cf. A006995) such that the number of contiguous palindromic bit patterns is minimal (for a given number of places).

Original entry on oeis.org

0, 1, 3, 5, 9, 17, 21, 27, 45, 51, 73, 93, 99, 107, 153, 165, 297, 313, 325, 403, 717, 843, 1241, 1421, 1619, 1675, 2409, 2661, 4841, 4953, 5349, 5709, 13011, 13515, 21349, 22861, 26067, 27083, 38505, 39513, 76905, 78937, 85349, 108235, 183117, 208083, 307817, 366413, 415955, 432843, 632409
Offset: 1

Views

Author

Hieronymus Fischer, Jan 23 2013

Keywords

Comments

For a given number of places m a binary palindrome has at least 2*(m-1) + floor((m-3)/2) palindromic substrings. To a certain extent, this number indicates the minimal possible grade of symmetry.
a(n) is the least binary palindrome > a(n-1) which have the same number of palindromic substrings than a(n-1). If such a palindrome doesn't exist, a(n) is the least binary palindrome with one additional digit which meets the minimal possible number of palindromic substrings for such increased number of digits.
b_left(n) := floor(a(n)/2^log_2(a(n))) is a term of A206926, if n > 3. More precise, the bit pattern of b_left(n) is contained in the concatenation of the bit patterns of 37 or of 41, provided n > 16.
b_right(n) := a(n) mod (2^(1+log_2(a(n))) is a term of A206926, if n > 6. More precise, the bit pattern of b_right(n) is contained in the concatenation of the bit patterns of 37 or of 41, provided n > 16.
Provided n > 16: The bit pattern of b_left(n) is contained in the continued concatenation of the bit pattern of 37 (or 41, respectively) if and only if the bit pattern of b_ right(n) is contained in the continued concatenation of the bit pattern of 41 (or 37, respectively).

Examples

			a(1) = 0, since 0 is a binary palindrome with 1 palindromic substring (=0) which is the minimum for binary palindromes with 1 place.
a(2) = 1, since 1 is a binary palindrome with 1 palindromic substring (=1) which is the minimum for binary palindromes with 1 place.
a(8) = 27, since 27=11011_2 is a binary palindrome with 9 palindromic substrings which is the minimum for binary palindromes with 5 places.
a(9) = 45, since 45=101101_2 is a binary palindrome with 11 palindromic substrings which is the minimum for binary palindromes with 6 places.
		

Crossrefs

Programs

  • Smalltalk
    "Calculates a(n) - not optimized.
    If the complete array 'answer' is answered instead of a separate term, the next 2 (if d is even) or 4 (if d is odd) terms are calculated simultaneously"
    | n min d B k j p q answer |
    answer := OrderedCollection new.
    n := self.
    B := #(0 1 3 5 9 17 21 27 45 51 73 93 99 107 153 165).
    n <= 16 ifTrue: [^s := B at: n].
    k := (n - 5) // 6 - 1.
    j := (n - 5) \\ 6 + 1.
    d := 2 * k + 7 + (j // 5).
    min := (d - 1) * 2 + ((d - 3) // 2).
    0 to: 5
      do:
       [:i |
       p := (6 * k + 4 + i) A206926.
       s := p * (2 raisedToInteger: d // 2).
       q := p // (2 - (j // 5)) reverse: 2.
       s A206925 = min ifTrue: [answer add: (s + q)]].
    ^answer at: j - (j // 5 * 4) [by Hieronymus Fischer]

Formula

a(n) = min(p > a(n-1) | p is binary palindrome and A206925(p) = A206925(a(n-1))), if this minimum exists, else a(n) = min(p > 2*2^floor(log(a(n-1))) | p is binary palindrome and A206925(p) = min(A206925(q) | q is binary palindrome and q > 2*2^floor(log(a(n-1))))).
a(n) = A006995(j), where j := j(n) = min(k > A206915(a(n-1)) | A206924(k) = A206925(a(n-1)), if this minimum exists, else j(n) = min(k > A206915(2*2^floor(log(a(n-1)))) | A206924(k) = min(a206925(A006995(i)) | i > A206915(2*2^floor(log(a(n-1)))))).
With k := k(n) = floor((n - 5)/6) - 1, j := j(n) = (n - 5) mod 6 + 1, d = 2k+7+floor(j/5),
c = 2*(d-1) + floor((d-3)/2), f(i) = A206926(6k + 4 + i)*2^floor(d/2) + Reversal(floor((A206926(6k + 4 + i))/(2 - floor(j/5)))), for i=0..5, we have
a(n) = b(j - 4*floor(j/5)), where b(m) = f(min(m-1<=i<=5 | A206925(f(i)) = c and f(i) <> b(l) for 1<=l
With m = 1+floor(log_2(a(n)), n > 3:
A206924(k) = 2(m-1) + floor((m-3)/2), where k is that uniquely determined number for which A006995(k) = a(n).
A206924(A206915(a(n))) = 2(m-1) + floor((m-3)/2).
A206924(A206915(a(n))) = 3*floor(log_2(A206915(a(n)))) + 2*floor(log_2(A206915(a(n))/3)) - 2, n > 3.

A217097 Least binary palindrome (cf. A006995) with n binary digits such that the number of contiguous palindromic bit patterns is minimal.

Original entry on oeis.org

0, 3, 5, 9, 17, 45, 73, 153, 297, 717, 1241, 2409, 4841, 13011, 21349, 38505, 76905, 183117, 307817, 632409, 1231465, 2929485, 5060185, 9853545, 19708521, 53261523, 87349605, 157653609, 315300457, 749917005, 1261214313, 2590611033, 5044869737, 11998647117, 20724946521
Offset: 1

Author

Hieronymus Fischer, Feb 10 2013

Keywords

Comments

Subsequence of A217099.
a(n) is the least binary palindrome with n binary digits which meets the minimal possible number of palindromic substrings for that number of digits.

Examples

			a(1) = 0, since 0 is the least binary palindrome with 1 palindromic substring (=0) which is the minimum for binary palindromes with 1 place.
a(3) = 5, since 5=101_2 is the least binary palindrome with 4 palindromic substrings which is the minimum for binary palindromes with 3 places.
a(6) = 45, since 45=101101_2 is the least binary palindrome with 11 palindromic substrings which is the minimum for binary palindromes with 6 places.
		

Crossrefs

Cf. A006995, A206923, A206924, A206925, A206926, A070939, A217098, 217099, 217100, 217101.

Formula

a(n) = min(p | p is binary palindrome with n binary digits and A206925(p) = min(A206925(q) | q is binary palindrome with n binary digits)).
a(n) = A006995(j), where j := j(n) = min(k > A206915(2^(n-1)) | A206924(k) = min(A206925(A006995(i)) | i > A206915(2^(n-1)))).
a(n) = min(p | p is binary palindrome with n binary digits and A206925(p) = 2*(n-1) + floor((n-3)/2)).

A217098 Greatest binary palindrome (cf. A006995) with n binary digits such that the number of contiguous palindromic bit patterns is minimal.

Original entry on oeis.org

1, 3, 5, 9, 27, 51, 107, 165, 403, 843, 1675, 2661, 5709, 13515, 27083, 39513, 108235, 208083, 432843, 682341, 1664211, 3461835, 6922955, 10918245, 23434061, 55390923, 110785227, 161912409, 443134667, 852178131, 1772532427, 2795133285, 6817395923, 14180201163, 28360356555
Offset: 1

Author

Hieronymus Fischer, Jan 23 2013

Keywords

Comments

Subsequence of A217099.
a(n) is the greatest binary palindrome with n binary digits which meets the minimal possible number of palindromic substrings for that number of digits.

Examples

			a(1) = 1, since 1 is the largest binary palindrome with 1 palindromic substring (=1) which is the minimum for binary palindromes with 1 place.
a(3) = 5, since 5=101_2 is the largest binary palindrome with 4 palindromic substrings which is the minimum for binary palindromes with 3 places.
a(6) = 51, since 51=110011_2 is the largest binary palindrome with 11 palindromic substrings which is the minimum for binary palindromes with 6 places.
		

Formula

a(n) = max(p | p is binary palindrome with n binary digits and A206925(p) = min(A206925(q) | q is binary palindrome with n binary digits)).
a(n) = A006995(j), where j := j(n) = max(k > A206915(2^(n-1)) | A206924(k) = min(A206925(A006995(i)) | i > A206915(2^(n-1)))).
a(n) = max(p | p is binary palindrome with n binary digits and A206925(p) = 2*(n-1) + floor((n-3)/2)).
Showing 1-10 of 12 results. Next