A276379 Write a "1" for each distinct prime divisor p of n in the (pi(p) - 1)-th place, ignoring multiplicity.
0, 1, 10, 1, 100, 11, 1000, 1, 10, 101, 10000, 11, 100000, 1001, 110, 1, 1000000, 11, 10000000, 101, 1010, 10001, 100000000, 11, 100, 100001, 10, 1001, 1000000000, 111, 10000000000, 1, 10010, 1000001, 1100, 11, 100000000000, 10000001, 100010, 101, 1000000000000, 1011, 10000000000000, 10001, 110
Offset: 1
Examples
a(1) = 0 since 1 is the empty product. a(0) is undefined. a(6) = a(12) = 11, since 6 and 12 are products of the 1st and 2nd primes (i.e., 2 and 3). Thus we write 1's in the corresponding places. Any number n that is the product only of powers e >= 1 of 2 and 3 (e.g., 24, 96, 144, etc.) has a(n) = 11. a(42) = 1011, since the prime divisors of 42 are 2, 3 and 7. Any number n that is the product only of powers e >= 1 of all of 2, 3 and 7 has a(n) = 1011. a(70) = 1101, since its prime divisors are 2, 5 and 7.
Links
Crossrefs
Programs
-
Maple
a:= n-> add(10^numtheory[pi](i[1]), i=ifactors(n)[2])/10: seq(a(n), n=1..53); # Alois P. Heinz, Feb 10 2020
-
Mathematica
f[n_] := If[n == 1, {0}, Function[k, ReplacePart[Table[0, {PrimePi[k[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> 1 &, k]]@ FactorInteger@ n]; Table[FromDigits@ Reverse@ f@ n, {n, 45}] (* or *) FromDigits[IntegerDigits[#, 2]] & /@ Table[Floor@ Total[2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)], {n, 45}] (* latter program after Jean-François Alcover at A087207 *)
Formula
G.f.: Sum_{k>=1} 10^(k-1) * x^prime(k) / (1 - x^prime(k)). - Ilya Gutkovskiy, Feb 10 2020
Comments