login
a(n) = A003961(A005940(n+1)) - 2 * A005940(n+1).
10

%I #20 May 22 2024 12:55:18

%S -1,-1,-1,1,-3,3,7,11,-3,1,5,21,-1,39,71,49,-9,5,13,23,7,45,85,87,23,

%T 47,95,153,93,267,463,179,-9,-5,-1,43,-19,81,149,109,-11,91,175,195,

%U 189,345,605,309,-73,167,311,241,357,435,775,531,645,529,965,909,1151,1551,2639,601,-15,-1,7,29,-11,63,127,185,5,53,125,327,87,573,997,407,-65,121,253,413,231

%N a(n) = A003961(A005940(n+1)) - 2 * A005940(n+1).

%C From _Antti Karttunen_, May 21 2024: (Start)

%C Like A005940 itself, also this irregular table derived from it can be represented as a binary tree:

%C -1

%C |

%C ................. -1 ..................

%C -1 1

%C -3 ......./ \....... 3 7 ......./ \....... 11

%C / \ / \ / \ / \

%C / \ / \ / \ / \

%C / \ / \ / \ / \

%C -3 1 5 21 -1 39 71 49

%C -9 5 13 23 7 45 85 87 23 47 95 153 93 267 463 179

%C etc.

%C (End)

%H Antti Karttunen, <a href="/A252750/b252750.txt">Table of n, a(n) for n = 0..16383</a>

%F a(n) = A003961(A005940(n+1)) - 2 * A005940(n+1).

%F a(n) = A252748(A005940(n+1)).

%F Other identities. For all n >= 1:

%F sgn(a(n)) = (-1)^(1+A252743(n)).

%o (Scheme) (define (A252750 n) (- (A003961 (A005940 (+ 1 n))) (* 2 (A005940 (+ 1 n)))))

%o (PARI)

%o A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };

%o A252750(n) = (A003961(A005940(1+n)) - (2 * A005940(1+n))); \\ _Antti Karttunen_, May 21 2024

%Y Cf. A252743 (characteristic function for positive terms), A252751 (partial sums of sequence b(0) = 0, b(n) = a(n), for n>0).

%Y Cf. A003961, A005940, A252745, A252748, A249820, A246282.

%Y Cf. A062234 (when negated forms the left edge apart from the initial term), A003063 (right edge).

%Y Cf. also A372562 (apart from the initial term, same data in square array).

%K sign,tabf

%O 0,5

%A _Antti Karttunen_, Dec 21 2014

%E Term a(0) = -1 prepended by _Antti Karttunen_, May 21 2024