OFFSET
1,7
COMMENTS
Compare to the scatter plot of A364563.
From Antti Karttunen, Aug 11 2023: (Start)
Can be computed as a certain kind of bitmask transformation of A364568 (analogous to the inverse Möbius transform that is appropriate for A156552-encoding of n).
See A364572, A364573 (and also A364576) for n (apart from those in A029747) where a(n) comes relatively close to the X-axis.
(End)
LINKS
FORMULA
EXAMPLE
MATHEMATICA
nn = 81; Array[Set[a[#], #] &, 2]; Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], Set[a[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]]], {n, 3, nn}]; Array[a[#] - # &, nn] (* Michael De Vlieger, Jul 28 2023 *)
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
(PARI) A364499(n) = { my(m=1, p=2, x=0, z=1); n--; while(n, if(!(n%2), p=nextprime(1+p), x += m; z *= p); n>>=1; m <<=1); (z-x)-1; }; \\ Antti Karttunen, Aug 06 2023
(Python)
from math import prod
from itertools import accumulate
from collections import Counter
from sympy import prime
def A364499(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(n-1)[2:].split('1')[:0:-1])).items())-n # Chai Wah Wu, Aug 07 2023
CROSSREFS
KEYWORD
sign,look
AUTHOR
Antti Karttunen, Jul 28 2023
STATUS
approved