A372277 Composite numbers that divide the concatenation of the reverse of their ascending order prime factors, with repetition, when written in binary.
87339, 332403, 9813039
Offset: 1
Examples
332403 is a term as 332403 = 3 * 179 * 619 = 11_2 * 10110011_2 * 1001101011_2 = "11"_2 * "11001101"_2 * "1101011001"_2 when each prime factor is reversed. This gives "11110011011101011001"_2 when concatenated, and 11110011011101011001_2 = 997209 which is divisible by 332403.
Programs
-
Mathematica
a[n_Integer] := Module[{f}, f = Flatten[ConstantArray @@@ FactorInteger[n]]; If[Length[f] < 2, Return[False]]; Mod[FromDigits[StringJoin[StringReverse[IntegerString[#, 2]] & /@ f], 2], n] == 0]; Select[Range[2, 10^5], a] (* Robert P. P. McKone, May 02 2024 *)
-
Python
from itertools import count, islice from sympy import factorint def A372277_gen(startvalue=4): # generator of terms >= startvalue for n in count(max(startvalue,4)): f = factorint(n) if sum(f.values()) > 1: c = 0 for p in sorted(f): a = pow(2,len(s:=bin(p)[2:]),n) q = int(s[::-1],2) for _ in range(f[p]): c = (c*a+q)%n if not c: yield n A372277_list = list(islice(A372277_gen(),3)) # Chai Wah Wu, Apr 25 2024
Comments