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.

Previous Showing 31-36 of 36 results.

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 255, 0, 766, 0, 2342, 0, 0, 0, 23373, 0, 75005, 0, 243824, 0, 800249, 0, 2643880, 0, 8789565, 0, 29396169, 0, 0, 0, 333867426, 0, 1132658742, 0, 3858864902, 0, 13182921033, 0, 0, 0, 0, 0, 537690715092, 0
Offset: 1

Views

Author

Floor van Lamoen, Oct 12 2005

Keywords

Crossrefs

Cf. A022894.

Programs

  • Maple
    A113043:=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^(-2*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,3)=0, b(m/3, 2*m/3, n),0) end: seq(a(n), n=1..70); # Alois P. Heinz, Sep 06 2009
  • Mathematica
    d = {1}; nMax = 100; Lst = {};
    Do[
      p = Prime[n];
      d = PadLeft[d, Length[d] + 3 p] + PadRight[d, Length[d] + 3 p];
      AppendTo[Lst, d[[-Ceiling[Length[d]/3]]]];
      , {n, 1, nMax}];
    Lst (* Ray Chandler, Mar 09 2014 *)

Extensions

Extended beyond a(40) by Alois P. Heinz, Sep 06 2009

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

A369560 a(n) = [x^n] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).

Original entry on oeis.org

1, 0, 1, 2, 3, 6, 16, 38, 91, 225, 547, 1407, 3570, 9250, 24578, 65740, 175626, 470084, 1279101, 3482419, 9547953, 26445796, 73251187, 203818706, 567543095, 1577629707, 4408095456, 12400615844, 34995570604, 99241500366, 282037360250, 795846583187
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 25 2024

Keywords

Comments

a(n) is the number of solutions to n = Sum_{i=1..n} c_i * prime(i) with c_i in {-1,0,1}.

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
          b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..32);  # Alois P. Heinz, Jan 25 2024
  • Mathematica
    Table[Coefficient[Product[x^Prime[k] + 1 + 1/x^Prime[k], {k, 1, n}], x, n], {n, 0, 31}]

A057611 Let m = 3, 5, 7, ..., k = 0, 1, 2, 3, ..., z = (m+1)/2, 0 < j <= m. Let n_j be a prime number. Sequence gives T(m,k) = Table[m,k] = number of solutions to Sum_{d=1,2, ..., (z+k)}(n_j)d = Sum{d=1,2, ..., (z-k-1)}(n_j)_d = primorial number (A002110).

Original entry on oeis.org

1, 1, 0, 2, 0, 0, 5, 0, 0, 0, 8, 5, 0, 0, 0, 19, 20, 0, 0, 0, 0, 66, 55, 1, 0, 0, 0, 0, 280, 48, 64, 0, 0, 0, 0, 0, 645, 584, 35, 22, 0, 0, 0, 0, 0, 2780, 842, 705, 10, 4, 0, 0, 0, 0, 0, 9163, 2754, 2867, 30, 46, 0, 0, 0, 0, 0, 0, 29869, 10771, 9904, 311, 230, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Naohiro Nomoto, Nov 27 2000

Keywords

Examples

			{1}; {1,0}; {2,0,0}; {5,0,0,0}; {8,5,0,0,0}; {19,20,0,0,0,0}; ..... ->-> 3+2=5 {m=3, Table[3,0]=1}; 2+7+5=3+11 {m=5, Table[5,0]=1, Table[5,1]=0}; 17+2+7+3=13+5+11 and 2+11+3+13=17+7+5 {m=7, Table[7,0]=2, Table[7,1]=0, Table[7,2]=0}.
		

Crossrefs

Formula

A022894(m) = Sum_{k=0, 1, 2, ..} [Number of solutions to Sum_{d=1, 2, ..., (z+k)}(n_j)d = Sum{ d=1, 2, ..., (z-k-1)}(n_j)_d]

A367088 Number of solutions to +- 1 +- 2 +- 3 +- 5 +- 7 +- ... +- prime(n-1) = 0 or 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 6, 7, 12, 19, 32, 53, 90, 156, 276, 493, 878, 1566, 2834, 5146, 9396, 17358, 32042, 59434, 110292, 204332, 380548, 713601, 1342448, 2538012, 4808578, 9043605, 17070234, 32268611, 61271738, 116123939, 220993892, 421000142, 802844420, 1534312896
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 26 2024

Keywords

Crossrefs

A369608 Number of solutions to +- 2 +- 3 +- 5 +- 7 +- ... +- prime(2*n) = prime(2*n).

Original entry on oeis.org

0, 2, 2, 6, 14, 39, 125, 399, 1310, 4356, 14970, 51715, 178832, 635778, 2290019, 8106059, 29234378, 105635076, 384409483, 1408730050, 5193316109, 19170300330, 71421970661, 263893092145, 984568438169, 3686368605467, 13838552783467, 52008816746450
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 27 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Coefficient[Product[(x^Prime[k] + 1/x^Prime[k]), {k, 1, 2 n}], x, Prime[2 n]], {n, 1, 28}]

Formula

a(n) = [x^prime(2*n)] Product_{k=1..2*n} (x^prime(k) + 1/x^prime(k)).
Previous Showing 31-36 of 36 results.