OFFSET
1,3
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Plot of the bits of a(n) with (x,y) = (n, a(n)) for 1 <= n <= 2^14.
EXAMPLE
A055204(1) = 1, the empty product; by convention a(1) = 0.
5! = 120 = 2^3 * 3 * 5, therefore 2 * 3 * 5 = 30 is the squarefree part, which we write "111", a 1 in the first three places to signify a product of the first three primes. Interpreting "111" as a binary number yields 8. Thus a(5) = 8.
13! = 6227020800 = 2^10 * 3^5 * 5^2 * 7 * 11 * 13; its squarefree part is 3 * 7 * 11 * 13 = 3003, a product of the 2nd, 4th, 5th, and 6th primes. Therefore we write "111010", which, interpreted as a binary number and converted to decimal, is 58. Thus a(13) = 58.
Table illustrating the first terms of this sequence, with b(n) = A055204(n):
Multiplicities of p|b(n)
n b(n) 2 3 5 7 11 13 17 -> Binary a(n)
--------------------------------------------------
1 1 . . . . . . . 0 0
2 2 1 . . . . . . 1 1
3 6 1 1 . . . . . 11 3
4 6 1 1 . . . . . 11 3
5 30 1 1 1 . . . . 111 7
6 5 . . 1 . . . . 100 4
7 35 . . 1 1 . . . 1100 12
8 70 1 . 1 1 . . . 1101 13
9 70 1 . 1 1 . . . 1101 13
10 7 . . . 1 . . . 1000 8
11 77 . . . 1 1 . . 11000 24
12 231 . 1 . 1 1 . . 11010 26
13 3003 . 1 . 1 1 1 . 111010 58
14 858 1 1 . . 1 1 . 110011 51
15 1430 1 . 1 . 1 1 . 110101 53
16 1430 1 . 1 . 1 1 . 110101 53
17 24310 1 . 1 . 1 1 1 1110101 117
18 12155 . . 1 . 1 1 1 1110100 116
...
MATHEMATICA
Block[{nn = 51, k, p}, k = PrimePi@ nn; Array[Set[p[Prime@ #], 0] &, k]; {0}~Join~Reap[Do[Map[Set[p[#1], Mod[p[#1] + Mod[#2, 2], 2]] & @@ # &, FactorInteger@ i]; Sow[FromDigits[Array[p[Prime[k - # + 1]] &, k], 2]], {i, 2, nn}]][[-1, 1]]] (* or *)
Block[{nn = 51, k = 1}, Reap[Do[Map[If[Mod[k, #] == 0, k /= #, k *= #] &, Flatten[ConstantArray[#1, #2] & @@@ FactorInteger@ i]]; Sow[If[k == 1, 0, Total@ Map[2^(PrimePi[#] - 1) &, FactorInteger[k][[All, 1]] ] ] ], {i, nn}]][[-1, 1]]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Sep 18 2020
STATUS
approved