login
a(n) = sum of 2^(k-1) such that floor(n/prime(k)) is even.
2

%I #10 May 05 2024 19:51:28

%S 0,0,0,1,1,2,2,3,1,4,4,7,7,14,8,9,9,10,10,15,5,20,20,23,19,50,48,57,

%T 57,62,62,63,45,108,96,99,99,226,192,197,197,206,206,223,217,472,472,

%U 475,467,470,404,437,437,438,418,427,297,808,808,815,815,1838,1828

%N a(n) = sum of 2^(k-1) such that floor(n/prime(k)) is even.

%C This is a transform of A372007(n) = s(n). Write the prime indices of k factors prime(k) | s(n) instead as 2^(k-1) and take the sum for all primes p | s(n). Hence, s(14) = 105 = 3*5*7 becomes a(14) = 2^1 + 2^2 + 2^3 = 2 + 4 + 8 = 14.

%H Michael De Vlieger, <a href="/A371907/b371907.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="https://doi.org/10.13140/RG.2.2.10066.36806">"Tiger Stripe" Factors of Primorials</a>, ResearchGate, 2024.

%H <a href="https://oeis.org/A372007/a372007.png">Plot powers 2^(i-1) that sum to a(n) at (x,y) = (n,i)</a> for n = 1..2048, 12X vertical exaggeration.

%F a(n) = A357215(n) - A371906(n).

%e a(1) = 0 since n = 1 is the empty product.

%e a(2) = 0 since for n = prime(1) = 2, floor(2/2) = 1 is odd. Therefore a(2) = 0.

%e a(3) = 0 since for n = 3 and prime(1) = 2, floor(3/2) = 1 is odd, and for prime(2) = 3, floor(3/3) = 1 is odd. Hence a(3) = 0.

%e a(4) = 1 since for n = 4 and prime(1) = 2, floor(4/2) = 2 is even, but for prime(2) = 3, floor(4/3) = 1 is odd. Therefore, a(4) = 2^(1-1) = 1.

%e a(8) = 1 since for n = 8, both floor(8/2) and floor(8/3) are even, but both floor(8/5) and floor(8/7) are odd. Therefore, a(8) = 2^(1-1) + 2^(2-1) = 1 + 2 = 3, etc.

%e Table relating a(n) with b(n), s(n), and t(n), diagramming powers of 2 with "x" that sum to a(n) or b(n), or prime factors with "x" that produce s(n) or t(n). Sequences s(n) = A372007(n), t(n) = A372000(n), c(n) = A034386(n), b(n) = A371906(n), and c(n) = A357215(n) = a(n) + b(n). Column A (at top) shows powers of 2 that sum to a(n), with B same for b(n), while column S represents prime factors of s(n), T same of t(n).

%e [A] 2^k [B] 2^k

%e n 0123 a(n) 012345 b(n) c(n) s(n) t(n) v(n)

%e --------------------------------------------------------

%e 1 . 0 . 0 2^0-1 1 1 P(0)

%e 2 . 0 x 1 2^1-1 1 2 P(1)

%e 3 . 0 xx 3 2^2-1 1 6 P(2)

%e 4 x 1 .x 2 2^2-1 2 3 P(2)

%e 5 x 1 .xx 6 2^3-1 2 15 P(3)

%e 6 .x 2 x.x 5 2^3-1 3 10 P(3)

%e 7 .x 2 x.xx 13 2^4-1 3 70 P(4)

%e 8 xx 3 ..xx 12 2^4-1 6 35 P(4)

%e 9 x 1 .xxx 14 2^4-1 2 105 P(4)

%e 10 ..x 4 xx.x 11 2^4-1 5 42 P(4)

%e 11 ..x 4 xx.xx 27 2^5-1 5 462 P(5)

%e 12 xxx 7 ...xx 24 2^5-1 30 77 P(5)

%e 13 xxx 7 ...xxx 56 2^6-1 30 1001 P(6)

%e 14 .xxx 14 x...xx 49 2^6-1 105 286 P(6)

%e 15 ...x 8 xxx.xx 55 2^6-1 7 4290 P(6)

%e 16 x..x 9 .xx.xx 54 2^6-1 14 2145 P(6)

%e --------------------------------------------------------

%e 2357 [T] 11

%e [S] 235713

%t Table[Total[2^(-1 + Select[Range@ PrimePi[n], EvenQ@ Quotient[n, Prime[#]] &])], {n, 50}]

%o (PARI) a(n) = my(vp=primes([1, n])); vecsum(apply(x->2^(x-1), Vec(select(x->(((n\x) % 2)==0), vp, 1)))); \\ _Michel Marcus_, Apr 30 2024

%Y Cf. A357215, A371906, A372007.

%K nonn,easy

%O 1,6

%A _Michael De Vlieger_, Apr 17 2024