login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334529 Numbers that are both binary palindromes and binary Niven numbers. 2
1, 21, 273, 4161, 22517, 28347, 65793, 69905, 81913, 87381, 106483, 109483, 121143, 292721, 299593, 317273, 319449, 350933, 354101, 368589, 378653, 421811, 470951, 479831, 1049601, 1135953, 1171313, 1172721, 1208009, 1257113, 1269593, 1295481, 1332549, 1371877 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
21 is a term since its binary representation, 10101, is palindromic, and 1 + 0 + 1 + 0 + 1 = 3 is a divisor of 21.
MATHEMATICA
Select[Range[10^6], PalindromeQ[(d = IntegerDigits[#, 2])] && Divisible[#, Plus @@ d] &]
PROG
(Python)
def ok(n): b = bin(n)[2:]; return b==b[::-1] and n%sum(map(int, b)) == 0
def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
print(aupto(1371877)) # Michael S. Branicky, Jan 21 2021
CROSSREFS
Intersection of A006995 and A049445.
Cf. A082232.
Sequence in context: A032535 A022745 A225967 * A004324 A243421 A028053
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, May 05 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)