cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A364499 a(n) = A005940(n) - n.

This page as a plain text file.
%I A364499 #36 Aug 11 2023 10:02:58
%S A364499 0,0,0,0,0,0,2,0,-2,0,4,0,12,4,12,0,-6,-4,2,0,14,8,22,0,24,24,48,8,96,
%T A364499 24,50,0,-20,-12,-2,-8,18,4,24,0,36,28,62,16,130,44,88,0,72,48,96,48,
%U A364499 192,96,170,16,286,192,316,48,564,100,180,0,-48,-40,-28,-24,-4,-4,28,-16,18,36,90,8,198,48,110,0,62
%N A364499 a(n) = A005940(n) - n.
%C A364499 Compare to the scatter plot of A364563.
%C A364499 From _Antti Karttunen_, Aug 11 2023: (Start)
%C A364499 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).
%C A364499 See A364572, A364573 (and also A364576) for n (apart from those in A029747) where a(n) comes relatively close to the X-axis.
%C A364499 (End)
%H A364499 Antti Karttunen, <a href="/A364499/b364499.txt">Table of n, a(n) for n = 1..16384</a>
%H A364499 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A364499 a(n) = -A364559(A005940(n)).
%F A364499 For all n >= 1, a(2*n) = 2*a(n).
%F A364499 For all n >= 1, a(A029747(n)) = 0.
%e A364499 A005940(528577) = 528581, therefore a(528577) = 528581 - 528577 = 4. (See A364576).
%e A364499 A005940(2109697) = 2109629, therefore a(2109697) = 2109629 - 2109697 = -68.
%t A364499 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 *)
%o A364499 (PARI)
%o A364499 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
%o A364499 A364499(n) = (A005940(n)-n);
%o A364499 (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
%o A364499 (Python)
%o A364499 from math import prod
%o A364499 from itertools import accumulate
%o A364499 from collections import Counter
%o A364499 from sympy import prime
%o A364499 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
%Y A364499 Cf. A005940, A364500 [= gcd(n,a(n))], A364559, A364572, A364573, A364576.
%Y A364499 Cf. A029747 (known positions of 0's), A364540 (positions of terms < 0), A364541 (of terms <= 0), A364542 (of terms >= 0), A364563 [= -a(A364543(n))].
%Y A364499 Cf. also A364258, A364568.
%K A364499 sign,look
%O A364499 1,7
%A A364499 _Antti Karttunen_, Jul 28 2023