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.

A373605 Sum of the even-indexed digits minus the sum of the odd-indexed digits in the primorial base representation (A049345) of n.

This page as a plain text file.
%I A373605 #16 Jun 19 2024 15:07:22
%S A373605 0,1,-1,0,-2,-1,1,2,0,1,-1,0,2,3,1,2,0,1,3,4,2,3,1,2,4,5,3,4,2,3,-1,0,
%T A373605 -2,-1,-3,-2,0,1,-1,0,-2,-1,1,2,0,1,-1,0,2,3,1,2,0,1,3,4,2,3,1,2,-2,
%U A373605 -1,-3,-2,-4,-3,-1,0,-2,-1,-3,-2,0,1,-1,0,-2,-1,1,2,0,1,-1,0,2,3,1,2,0,1,-3,-2,-4,-3,-5,-4,-2,-1,-3
%N A373605 Sum of the even-indexed digits minus the sum of the odd-indexed digits in the primorial base representation (A049345) of n.
%C A373605 Alternating digit sum in primorial base, starting with a positive sign for the rightmost (least significant) digit.
%H A373605 Antti Karttunen, <a href="/A373605/b373605.txt">Table of n, a(n) for n = 0..16170</a>
%H A373605 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F A373605 a(n) = A373606(n) - A373607(n).
%F A373605 a(n) = A195017(A276086(n)).
%e A373605 A049345(85) = 2401, thus the sum of digits at even positions (with the rightmost digit having index 0) is 1+4 = 5, and at the odd positions 0+2 = 2, therefore a(85) = 5-2 = 3.
%o A373605 (PARI) A373605(n) = { my(p=2, i=1, s=0); while(n, s += i*(n%p); n = n\p; p = nextprime(1+p); i = -i); (s); };
%Y A373605 Cf. A049345, A195017, A276086, A373606, A373607, A373830, A373831 (indices of multiples of 3).
%Y A373605 Analogous sequences for bases 2-10: A065359, A065368, A346688, A346689, A346690, A346691, A346731, A346732, A055017.
%K A373605 sign,base,easy
%O A373605 0,5
%A A373605 _Antti Karttunen_, Jun 18 2024