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.

A357631 Numbers k such that the half-alternating sum of the prime indices of k is 0.

Original entry on oeis.org

1, 12, 16, 30, 63, 70, 81, 108, 154, 165, 192, 256, 273, 286, 300, 325, 442, 480, 561, 588, 595, 625, 646, 700, 741, 750, 874, 931, 972, 1008, 1045, 1080, 1120, 1173, 1296, 1334, 1452, 1470, 1495, 1540, 1653, 1728, 1771, 1798, 2028, 2139, 2294, 2401, 2430
Offset: 1

Views

Author

Gus Wiseman, Oct 09 2022

Keywords

Comments

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 - ...
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.
If k is a term, then so is m^4 * k for any m >= 1. - Robert Israel, Oct 10 2023

Examples

			The terms together with their prime indices begin:
    1: {}
   12: {1,1,2}
   16: {1,1,1,1}
   30: {1,2,3}
   63: {2,2,4}
   70: {1,3,4}
   81: {2,2,2,2}
  108: {1,1,2,2,2}
  154: {1,4,5}
  165: {2,3,5}
  192: {1,1,1,1,1,1,2}
  256: {1,1,1,1,1,1,1,1}
  273: {2,4,6}
  286: {1,5,6}
  300: {1,1,2,3,3}
		

Crossrefs

The version for original alternating sum is A000290.
The version for standard compositions is A357625, reverse A357626.
Positions of zeros in A357629, reverse A357633.
The skew-alternating form is A357632, reverse A357636.
The reverse version is A357635.
These partitions are counted by A357639, skew A357640.
A056239 adds up prime indices, row sums of A112798.
A316524 gives alternating sum of prime indices, reverse A344616.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, even A357642.

Programs

  • Maple
    f:= proc(n) local F,Q,i;
    F:= sort(ifactors(n)[2],(s,t) -> s[1] numtheory:-pi(t[1])$t[2],F);
    Q:= [-1,1,1,-1];
    add(Q[i mod 4 + 1]*F[i],i=1..nops(F))
    end proc:
    select(f=0, [$1..10000]); # Robert Israel, Oct 10 2023
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Select[Range[1000],halfats[primeMS[#]]==0&]