Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Revision History for A331804

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the largest positive integer occurring, when written in binary, as a substring in both binary n and its reversal (A030101(n)).
(history; published version)
#12 by Joerg Arndt at Tue Jan 28 01:36:53 EST 2020
STATUS

reviewed

approved

#11 by Michel Marcus at Tue Jan 28 01:27:33 EST 2020
STATUS

proposed

reviewed

#10 by Rémy Sigrist at Tue Jan 28 01:21:08 EST 2020
STATUS

editing

proposed

Discussion
Tue Jan 28
01:27
Michel Marcus: nice graph
#9 by Rémy Sigrist at Tue Jan 28 01:18:18 EST 2020
LINKS

Rémy Sigrist, <a href="/A331804/b331804.txt">Table of n, a(n) for n = 0..8192</a>

STATUS

approved

editing

Discussion
Tue Jan 28
01:21
Rémy Sigrist: added b-file
#8 by Susanna Cuyler at Tue Jan 28 00:31:57 EST 2020
STATUS

proposed

approved

#7 by Rémy Sigrist at Mon Jan 27 14:51:45 EST 2020
STATUS

editing

proposed

#6 by Rémy Sigrist at Mon Jan 27 14:48:03 EST 2020
CROSSREFS
#5 by Rémy Sigrist at Sun Jan 26 15:30:44 EST 2020
NAME

a(n) is the largest positive integer occurring, when written in binary, as a substring in both binary n and in the binary its reversal of n (A030101(n)).

FORMULA

a(n) <= n with equality iff n is a binary palindrome (A006995).

EXAMPLE

The first terms, alongside the binary representations of n and of a(n), are:

n a(n) bin(n) bin(a(n))

-- ---- ------ ---------

0 0 0 0

1 1 1 1

2 1 10 1

3 3 11 11

4 1 100 1

5 5 101 101

6 3 110 11

7 7 111 111

8 1 1000 1

9 9 1001 1001

10 5 1010 101

11 5 1011 101

12 3 1100 11

PROG

(PARI) sub(n) = { my (b=binary(n), s=[0]); for (i=1, #b, if (b[i], for (j=i, #b, s=setunion(s, Set(fromdigits(b[i..j], 2)))))); return (s) }

a(n) = my (i=setintersect(sub(n), sub(fromdigits(Vecrev(binary(n)), 2)))); i[#i]

CROSSREFS
#4 by Rémy Sigrist at Sun Jan 26 15:00:35 EST 2020
COMMENTS

All terms a(7479) = 29 ("11101" in binary) is the first term that does not belong to A057890.

#3 by Rémy Sigrist at Sun Jan 26 14:54:13 EST 2020
COMMENTS

All terms belong to A057890.

CROSSREFS