OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10010 (terms below 10^7)
FORMULA
Sum_{n>=1} 1/a(n) = Product_{p in A016041} p/(p-1) = 2.52136...
EXAMPLE
15 is a term since the binary representation of its prime factors, 3 and 5, are both palindromes: 11 and 101.
1 is a term because it has no prime factors, and "the empty set has every property". - N. J. A. Sloane, Jan 16 2022
MATHEMATICA
seq[max_] := Module[{ps = Select[Range[max], PalindromeQ @ IntegerDigits[#, 2] && PrimeQ[#] &], s = {1}, s1, s2}, Do[p = ps[[k]]; emax = Floor@Log[p, max]; s1 = Join[{1}, p^Range[emax]]; s2 = Select[Union[Flatten[Outer[Times, s, s1]]], # <= max &]; s = Union[s, s2], {k, 1, Length[ps]}]; s]; seq[1000]
Join[{1}, Module[{bps=Select[Prime[Range[200]], IntegerDigits[#, 2] == Reverse[ IntegerDigits[ #, 2]]&]}, Select[ Range[Max[ bps]], SubsetQ[ bps, FactorInteger[#][[All, 1]]]&]]] (* Harvey P. Dale, Jan 16 2022 *)
PROG
(Python)
from sympy import factorint
def ispal(s): return s == s[::-1]
def ok(n): return n > 0 and all(ispal(bin(f)[2:]) for f in factorint(n))
print([k for k in range(528) if ok(k)]) # Michael S. Branicky, Jan 17 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 27 2021
EXTENSIONS
"Positive" added to definition by N. J. A. Sloane, Jan 16 2022
STATUS
approved