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.
%I A357631 #12 Oct 10 2023 16:22:30 %S A357631 1,12,16,30,63,70,81,108,154,165,192,256,273,286,300,325,442,480,561, %T A357631 588,595,625,646,700,741,750,874,931,972,1008,1045,1080,1120,1173, %U A357631 1296,1334,1452,1470,1495,1540,1653,1728,1771,1798,2028,2139,2294,2401,2430 %N A357631 Numbers k such that the half-alternating sum of the prime indices of k is 0. %C A357631 We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ... %C A357631 A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. %C A357631 If k is a term, then so is m^4 * k for any m >= 1. - _Robert Israel_, Oct 10 2023 %H A357631 Robert Israel, <a href="/A357631/b357631.txt">Table of n, a(n) for n = 1..10000</a> %e A357631 The terms together with their prime indices begin: %e A357631 1: {} %e A357631 12: {1,1,2} %e A357631 16: {1,1,1,1} %e A357631 30: {1,2,3} %e A357631 63: {2,2,4} %e A357631 70: {1,3,4} %e A357631 81: {2,2,2,2} %e A357631 108: {1,1,2,2,2} %e A357631 154: {1,4,5} %e A357631 165: {2,3,5} %e A357631 192: {1,1,1,1,1,1,2} %e A357631 256: {1,1,1,1,1,1,1,1} %e A357631 273: {2,4,6} %e A357631 286: {1,5,6} %e A357631 300: {1,1,2,3,3} %p A357631 f:= proc(n) local F,Q,i; %p A357631 F:= sort(ifactors(n)[2],(s,t) -> s[1]<t[1]); %p A357631 F:= map(t -> numtheory:-pi(t[1])$t[2],F); %p A357631 Q:= [-1,1,1,-1]; %p A357631 add(Q[i mod 4 + 1]*F[i],i=1..nops(F)) %p A357631 end proc: %p A357631 select(f=0, [$1..10000]); # _Robert Israel_, Oct 10 2023 %t A357631 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; %t A357631 halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}]; %t A357631 Select[Range[1000],halfats[primeMS[#]]==0&] %Y A357631 The version for original alternating sum is A000290. %Y A357631 The version for standard compositions is A357625, reverse A357626. %Y A357631 Positions of zeros in A357629, reverse A357633. %Y A357631 The skew-alternating form is A357632, reverse A357636. %Y A357631 The reverse version is A357635. %Y A357631 These partitions are counted by A357639, skew A357640. %Y A357631 A056239 adds up prime indices, row sums of A112798. %Y A357631 A316524 gives alternating sum of prime indices, reverse A344616. %Y A357631 A351005 = alternately equal and unequal partitions, compositions A357643. %Y A357631 A351006 = alternately unequal and equal partitions, compositions A357644. %Y A357631 A357641 counts comps w/ half-alt sum 0, even A357642. %Y A357631 Cf. A003963, A053251, A055932, A357189, A357485-A357488, A357621-A357624, A357630, A357634, A357637. %K A357631 nonn %O A357631 1,2 %A A357631 _Gus Wiseman_, Oct 09 2022