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 11-20 of 32 results. Next

A340961 Number of ways to write n as an ordered sum of 5 primes.

Original entry on oeis.org

1, 5, 10, 15, 25, 36, 50, 65, 70, 90, 110, 125, 155, 170, 200, 241, 270, 300, 350, 375, 435, 500, 530, 600, 640, 696, 760, 850, 840, 985, 990, 1170, 1160, 1370, 1250, 1570, 1445, 1760, 1600, 2000, 1710, 2340, 1950, 2555, 2165, 2876, 2320, 3340, 2560, 3595, 2880, 3985, 3050
Offset: 10

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 5):
    seq(a(n), n=10..62);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 62; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^5, {x, 0, nmax}], x] // Drop[#, 10] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^5.

A340962 Number of ways to write n as an ordered sum of 6 primes.

Original entry on oeis.org

1, 6, 15, 26, 45, 72, 106, 150, 186, 236, 306, 366, 455, 540, 636, 782, 912, 1056, 1236, 1410, 1617, 1896, 2106, 2400, 2696, 2976, 3348, 3716, 4026, 4446, 4917, 5340, 5982, 6380, 7017, 7476, 8377, 8640, 9765, 9936, 11202, 11496, 13132, 12930, 15117, 14672, 17178, 16800, 19696
Offset: 12

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 6):
    seq(a(n), n=12..60);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 60; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^6, {x, 0, nmax}], x] // Drop[#, 12] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^6.

A340963 Number of ways to write n as an ordered sum of 7 primes.

Original entry on oeis.org

1, 7, 21, 42, 77, 133, 210, 316, 434, 574, 770, 980, 1239, 1547, 1876, 2331, 2828, 3367, 4032, 4746, 5565, 6574, 7602, 8757, 10136, 11480, 13132, 14882, 16646, 18662, 20951, 23268, 26082, 28861, 31787, 35218, 38745, 42532, 46403, 50883, 54810, 60613, 65016, 71302, 76069
Offset: 14

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 7):
    seq(a(n), n=14..58);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 58; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^7, {x, 0, nmax}], x] // Drop[#, 14] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^7.

A340964 Number of ways to write n as an ordered sum of 8 primes.

Original entry on oeis.org

1, 8, 28, 64, 126, 232, 392, 624, 925, 1296, 1800, 2416, 3158, 4088, 5152, 6504, 8142, 9976, 12216, 14784, 17738, 21296, 25272, 29736, 35023, 40768, 47328, 54832, 62728, 71744, 81796, 92736, 105078, 118664, 132924, 149424, 167002, 186144, 206852, 229272, 253023
Offset: 16

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 8):
    seq(a(n), n=16..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^8, {x, 0, nmax}], x] // Drop[#, 16] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^8.

A340965 Number of ways to write n as an ordered sum of 9 primes.

Original entry on oeis.org

1, 9, 36, 93, 198, 387, 696, 1170, 1845, 2740, 3960, 5562, 7566, 10125, 13248, 17133, 22014, 27774, 34776, 43173, 53010, 64869, 78696, 94617, 113415, 134946, 159552, 188164, 219960, 256041, 297180, 342846, 394614, 452595, 516276, 587997, 667938, 755109, 852444
Offset: 18

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 9):
    seq(a(n), n=18..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^9, {x, 0, nmax}], x] // Drop[#, 18] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^9.

A340966 Number of ways to write n as an ordered sum of 10 primes.

Original entry on oeis.org

1, 10, 45, 130, 300, 622, 1185, 2100, 3495, 5480, 8266, 12100, 17140, 23730, 32155, 42802, 56400, 73180, 93820, 119250, 149872, 187090, 231765, 284490, 347335, 421332, 507580, 608840, 725500, 859450, 1014473, 1190700, 1392100, 1621710, 1879950, 2172610, 2503580
Offset: 20

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 10):
    seq(a(n), n=20..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^10, {x, 0, nmax}], x] // Drop[#, 20] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^10.

A065577 Number of Goldbach partitions of 10^n.

Original entry on oeis.org

2, 6, 28, 127, 810, 5402, 38807, 291400, 2274205, 18200488, 149091160, 1243722370, 10533150855, 90350630388
Offset: 1

Views

Author

Robert G. Wilson v, Dec 01 2001

Keywords

Comments

Number of ways of writing 10^n as the sum of two odd primes, when the order does not matter.

Examples

			a(1)=2 because 10 = 3+7 = 5+5;
a(2)=6 because 100 = 3+97 = 11+89 = 17+83 = 29+71 = 41+59 = 47+53; ...
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[n_] := Block[{c = 0, lmt = n/2, p = 3}, While[p <= lmt, If[ PrimeQ[n - p], c++ ]; p = NextPrim@p]; c]; Array[f, 10] (* Robert G. Wilson v, Nov 01 2006 *)
    a[n]:=Length[Select[n - Prime[Range[PrimePi[n/2]]], PrimeQ]]; Table[a[n],{n, 10^3, 10^3}] (* Luciano Ancora, Mar 16 2015 *)

Formula

a(n) = A061358(10^n).

Extensions

a(9) from Zak Seidov Nov 01 2006
a(10) from R. J. Mathar and David W. Wilson, Nov 02 2006
a(11) from David W. Wilson and Russ Cox, Nov 03 2006
a(12) from Russ Cox, Nov 04 2006
a(13) from Donovan Johnson, Nov 16 2009
a(14) from Huang Yuanbing (bailuzhou(AT)163.com), Dec 24 2009

A076608 Number of nonprimes k < n such that also n-k is not a prime.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 2, 1, 2, 4, 2, 3, 4, 4, 4, 7, 4, 7, 6, 7, 6, 10, 6, 11, 8, 12, 8, 13, 10, 15, 12, 13, 12, 18, 12, 21, 14, 16, 16, 21, 16, 23, 18, 21, 18, 24, 18, 27, 20, 27, 20, 27, 22, 31, 24, 29, 24, 32, 26, 37, 28, 30, 28, 37, 28, 41, 30, 33, 32, 41, 32, 43, 34, 40, 34, 43, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 21 2002

Keywords

Comments

a(n) is odd iff n is even and n/2 is not prime.
Convolution of A005171 with itself. - R. J. Mathar, Sep 10 2021

Examples

			5=1+4=2+3=3+2=4+1, hence a(5)=2;
6=1+5=2+4=3+3=4+2=5+1, hence a(6)=0.
		

Crossrefs

Programs

  • Mathematica
    Table[With[{nn=m},Total[Table[If[NoneTrue[{n,nn-n},PrimeQ],1,0],{n,nn-1}]]],{m,80}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 15 2020 *)

A341982 Number of ways to write n as an ordered sum of 2 primes (counting 1 as a prime).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 4, 2, 3, 0, 4, 2, 5, 2, 4, 0, 6, 2, 6, 2, 5, 0, 8, 2, 5, 0, 4, 0, 8, 2, 6, 2, 7, 0, 8, 0, 5, 2, 6, 0, 10, 2, 8, 2, 7, 0, 12, 2, 8, 0, 6, 0, 12, 2, 6, 0, 7, 0, 14, 2, 7, 2, 10, 0, 12, 0, 6, 2, 10, 0, 14, 2, 11, 2, 10, 0, 14, 0, 10, 2, 9, 0, 18, 2, 9, 0, 8
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; series(`if`(n=0, 1, x*add(
          `if`(j=1 or isprime(j), b(n-j), 0), j=1..n)), x, 3)
        end:
    a:= n-> coeff(b(n), x, 2):
    seq(a(n), n=2..88);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    nmax = 88; CoefficientList[Series[(x + Sum[x^Prime[k], {k, 1, nmax}])^2, {x, 0, nmax}], x] // Drop[#, 2] &

Formula

G.f.: ( x + Sum_{k>=1} x^prime(k) )^2.

A347739 Number of compositions (ordered partitions) of n into at most 2 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 1, 3, 2, 2, 3, 1, 2, 3, 3, 2, 4, 1, 4, 3, 4, 2, 5, 1, 6, 2, 5, 0, 4, 1, 6, 3, 4, 2, 7, 0, 8, 1, 3, 2, 6, 1, 8, 3, 6, 2, 7, 1, 10, 2, 8, 0, 6, 1, 10, 2, 6, 0, 7, 1, 12, 3, 5, 2, 10, 0, 12, 1, 4, 2, 10, 1, 12, 3, 9, 2, 10, 0, 14, 1, 8
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length@Flatten[Permutations/@IntegerPartitions[n,2,Prime@Range@PrimePi@n],1],{n,0,100}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)

Formula

a(n) = Sum_{k=1..2} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021
Previous Showing 11-20 of 32 results. Next