login
A364258
a(n) = A163511(n) - n.
12
1, 1, 2, 0, 4, 4, 0, -2, 8, 18, 8, 14, 0, 2, -4, -8, 16, 64, 36, 106, 16, 54, 28, 26, 0, 20, 4, 8, -8, -8, -16, -20, 32, 210, 128, 590, 72, 338, 212, 304, 32, 184, 108, 202, 56, 102, 52, 74, 0, 86, 40, 124, 8, 52, 16, 22, -16, 6, -16, -4, -32, -28, -40, -50, 64, 664, 420, 3058, 256, 1806, 1180, 2330, 144, 1052, 676
OFFSET
0,3
COMMENTS
Compare also to the scatter plot of A364294.
LINKS
FORMULA
a(n) = A364288(A163511(n)).
For n >= 1, a(2*n) = 2*a(n).
For n >= 0, a(A007283(n)) = 0.
MATHEMATICA
f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; {1}~Join~Table[-n + Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}] ][DigitCount[n, 2, 1]], {n, 120}] (* Michael De Vlieger, Jul 25 2023 *)
PROG
(Python)
from sympy import nextprime
def A364258(n):
c, p, k = 1, 1, n
while k:
c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
k >>= s+1
return c*p-n # Chai Wah Wu, Jul 25 2023
CROSSREFS
Cf. A007283, A163511, A364255 [= gcd(n,a(n))], A364287 (positions of negative terms), A364292 (of terms <= 0), A364288, A364294 [= -a(A364293(n))].
Sequence in context: A177806 A286550 A366282 * A307658 A265511 A081236
KEYWORD
sign,look
AUTHOR
Antti Karttunen, Jul 25 2023
STATUS
approved