A331897 Positive numbers all of whose divisors are negabinary palindromes (A331891) with a record number of divisors.
1, 3, 21, 5397, 353703189
Offset: 1
Examples
21 is a term since all the divisors of 21, {1, 3, 7, 21}, are palindromes in negabinary representation: {1, 111, 11011, 10101}, and it has 4 divisors, more than the number of divisors of smaller numbers with this property: 1, 3, 5, 7, 11, and 17 have no more than 2 divisors.
Programs
-
Mathematica
negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; negaBinPalQ[n_] := PalindromeQ[negabin[n]]; negaBinAllDivPalQ[n_] := negaBinPalQ[n] && AllTrue[Most @ Divisors[n], negaBinPalQ]; divNumMax = 0; seq={}; Do[If[negaBinAllDivPalQ[n] && (divNum = DivisorSigma[0, n]) > divNumMax, divNumMax = divNum; AppendTo[seq, n]], {n, 1, 6000}]; seq
Comments