login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A331896
Positive numbers all of whose divisors are negabinary palindromes (A331891).
2
1, 3, 5, 7, 11, 17, 21, 23, 31, 43, 51, 77, 85, 103, 127, 155, 211, 217, 233, 257, 301, 341, 479, 635, 683, 739, 771, 857, 889, 937, 1117, 1229, 1285, 1333, 1367, 1799, 1951, 2111, 2159, 2383, 2395, 2459, 2731, 2827, 3187, 3251, 3347, 3937, 4001, 4273, 4369
OFFSET
1,2
LINKS
EXAMPLE
21 is a term since all the divisors of 21, {1, 3, 7, 21}, are palindromes in negabinary representation: {1, 111, 11011, 10101}.
MATHEMATICA
negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; nbPalinQ[n_] := PalindromeQ @ negabin[n]; negaBinAllDivPalQ[n_] := nbPalinQ[n] && AllTrue[Most @ Divisors[n], nbPalinQ]; Select[Range[5000], negaBinAllDivPalQ]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jan 30 2020
STATUS
approved