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.

A113044 Number of ways you can split the set of the first n primes into two proper subsets of which the sum of one is thrice the sum of the other.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 11, 0, 0, 0, 75, 0, 203, 0, 558, 0, 1559, 0, 0, 0, 12786, 0, 37147, 0, 108491, 0, 321551, 0, 964713, 0, 2904950, 0, 8775407, 0, 0, 0, 0, 0, 0, 0, 760875083, 0, 0, 0, 7272292133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2063638853745109
Offset: 1

Views

Author

Floor van Lamoen, Oct 12 2005

Keywords

Crossrefs

Cf. A022894.

Programs

  • Maple
    A113044:=proc(n) local i,j,p,t; t:=0; for j from 2 to n do p:=1; for i to j do p:=p*(x^(-3*ithprime(i))+x^(ithprime(i))); od; t:=t,coeff(p,x,0); od; t; end;
    # second Maple program
    sp:= proc(n) option remember; `if` (n=1, 2, sp(n-1) +ithprime(n)) end: b:= proc() option remember; local i, j, t; `if` (args[1]=0, `if` (nargs=2, 1, b(args[t] $t=2..nargs)), add (`if` (args[j] -ithprime (args[nargs]) <0, 0, b(sort ([seq (args[i] -`if` (i=j, ithprime (args[nargs]), 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local m; m:= sp(n); `if` (irem(m, 4)=0, b(m/4, 3*m/4, n), 0) end: seq (a(n), n=1..70); # Alois P. Heinz, Nov 02 2011
  • Mathematica
    d = {1}; nMax = 100; Lst = {};
    Do[
      p = Prime[n];
      d = PadLeft[d, Length[d] + 4 p] + PadRight[d, Length[d] + 4 p];
      AppendTo[Lst, d[[-Ceiling[Length[d]/4]]]];
      , {n, 1, nMax}];
    Lst(* Ray Chandler, Mar 09 2014 *)

Extensions

More terms from Alois P. Heinz, Nov 02 2011