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.

Showing 1-10 of 32 results. Next

A073611 Smallest m such that there are n primes of the form m-p where p is a prime. Index of the first occurrence of n in A073610.

Original entry on oeis.org

1, 4, 5, 10, 16, 22, 24, 34, 36, 74, 48, 106, 60, 178, 78, 142, 84, 202, 90, 358, 114, 274, 144, 386, 120, 466, 168, 514, 180, 502, 234, 802, 246, 622, 288, 746, 240, 694, 210, 914, 324, 1322, 300, 958, 360, 1094, 474, 1198, 330, 1234, 528, 1282, 576, 1366, 390
Offset: 0

Views

Author

Amarnath Murthy, Aug 05 2002

Keywords

Crossrefs

Cf. A073610.

Extensions

Corrected and extended by Matthew Conroy, Sep 09 2002
Offset corrected by Sean A. Irvine, Dec 10 2024

A061358 Number of ways of writing n = p+q with p, q primes and p >= q.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Apr 28 2001

Keywords

Comments

For an odd number n, a(n) = 0 if n-2 is not a prime, otherwise a(n) = 1.
For n > 1, a(2n) is at least 1, according to Goldbach's conjecture.
a(A014092(n)) = 0; a(A014091(n)) > 0; a(A067187(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
Number of partitions of n into two primes.
Number of unordered ways of writing n as the sum of two primes.
a(2*n) = A068307(2*n+2). - Reinhard Zumkeller, Aug 08 2009
4*a(n) is the total number of divisors of all primes p and q such that n = p+q and p >= q. - Wesley Ivan Hurt, Mar 05 2016
Indices where a(n) = 0 correspond to A164376 UNION A025584. - Bill McEachen, Jan 31 2024

Examples

			a(22) = 3 because 22 can be written as 3+19, 5+17 and 11+11.
		

Crossrefs

Programs

  • Magma
    [#RestrictedPartitions(n,2,{p:p in PrimesUpTo(1000)}):n in [0..100] ] // Marius A. Burtea, Jan 19 2019
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..30): gser:=series(g,x=0,110): seq(coeff(gser,x,n),n=0..105); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    a[n_] := Length[Select[n - Prime[Range[PrimePi[n/2]]], PrimeQ]]; Table[a[n], {n, 0, 100}] (* Paul Abbott, Jan 11 2005 *)
    With[{nn=110},CoefficientList[Series[Sum[x^(Prime[i]+Prime[j]),{j,nn},{i,j}],{x,0,nn}],x]] (* Harvey P. Dale, Aug 17 2017 *)
    Table[Count[IntegerPartitions[n,{2}],?(AllTrue[#,PrimeQ]&)],{n,0,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jul 03 2021 *)
  • PARI
    a(n)=my(s);forprime(q=2,n\2,s+=isprime(n-q));s \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from sympy import primerange, isprime, floor
    def a(n):
        s=0
        for q in primerange(2, n//2 + 1): s+=isprime(n - q)
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 30 2017
    

Formula

G.f.: Sum_{j>0} Sum_{i=1..j} x^(p(i)+p(j)), where p(k) is the k-th prime. - Emeric Deutsch, Apr 03 2006
A065577(n) = a(10^n).
From Wesley Ivan Hurt, Jan 04 2013: (Start)
a(n) = Sum_{i=1..floor(n/2)} A010051(i) * A010051(n-i).
a(n) = Sum_{i=1..floor(n/2)} floor((A010051(i) + A010051(n-i))/2). (End)
a(n) + A062610(n) + A062602(n) = A004526(n). - R. J. Mathar, Sep 10 2021
a(n) = Sum_{k=floor((n-1)^2/4)+1..floor(n^2/4)} c(A339399(2k-1)) * c(A339399(2k)), where c = A010051. - Wesley Ivan Hurt, Jan 19 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
Comments edited by Zak Seidov, May 28 2014

A014092 Numbers that are not the sum of 2 primes.

Original entry on oeis.org

1, 2, 3, 11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53, 57, 59, 65, 67, 71, 77, 79, 83, 87, 89, 93, 95, 97, 101, 107, 113, 117, 119, 121, 123, 125, 127, 131, 135, 137, 143, 145, 147, 149, 155, 157, 161, 163, 167, 171, 173, 177, 179, 185, 187, 189, 191, 197, 203, 205, 207, 209
Offset: 1

Views

Author

Keywords

Comments

Suggested by the Goldbach conjecture that every even number larger than 2 is the sum of 2 primes.
Since (if we believe the Goldbach conjecture) all the entries > 2 in this sequence are odd, they are equal to 2 + an odd composite number (or 1).
Otherwise said, the sequence consists of 2 and odd numbers k such that k-2 is not prime. In particular there is no element from A006512, greater of a twin prime pair. - M. F. Hasler, Sep 18 2012
Values of k such that A061358(k) = 0. - Emeric Deutsch, Apr 03 2006
Values of k such that A073610(k) = 0. - Graeme McRae, Jul 18 2006

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 2.8 (for Goldbach conjecture).

Crossrefs

Cf. A010051, A000040, A051035 (composites).
Equivalent sequence for prime powers: A071331.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: this sequence (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Haskell
    a014092 n = a014092_list !! (n-1)
    a014092_list = filter (\x ->
       all ((== 0) . a010051) $ map (x -) $ takeWhile (< x) a000040_list) [1..]
    -- Reinhard Zumkeller, Sep 28 2011
    
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..50): gser:=series(g,x=0,230): a:=proc(n) if coeff(gser,x^n)=0 then n else fi end: seq(a(n),n=1..225); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    s1falsifiziertQ[s_]:= Module[{ip=IntegerPartitions[s, {2}], widerlegt=False},Do[If[PrimeQ[ip[[i,1]] ] ~And~ PrimeQ[ip[[i,2]] ], widerlegt = True; Break[]],{i,1,Length[ip]}];widerlegt]; Select[Range[250],s1falsifiziertQ[ # ]==False&] (* Michael Taktikos, Dec 30 2007 *)
    Join[{1,2},Select[Range[3,300,2],!PrimeQ[#-2]&]] (* Zak Seidov, Nov 27 2010 *)
    Select[Range[250],Count[IntegerPartitions[#,{2}],?(AllTrue[#,PrimeQ]&)]==0&] (* _Harvey P. Dale, Jun 08 2022 *)
  • PARI
    isA014092(n)=local(p,i) ; i=1 ; p=prime(i); while(pA014092(a), print(n," ",a); n++)) \\ R. J. Mathar, Aug 20 2006
    
  • Python
    from sympy import prime, isprime
    def ok(n):
        i=1
        x=prime(i)
        while xIndranil Ghosh, Apr 29 2017

Formula

Odd composite numbers + 2 (essentially A014076(n) + 2 ).
Equals {2} union A005408 \ A052147, i.e., essentially the complement of A052147 (or rather A048974) within the odd numbers A005408. - M. F. Hasler, Sep 18 2012

A047845 a(n) = (m-1)/2, where m is the n-th odd nonprime (A014076(n)).

Original entry on oeis.org

0, 4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, 32, 34, 37, 38, 40, 42, 43, 45, 46, 47, 49, 52, 55, 57, 58, 59, 60, 61, 62, 64, 66, 67, 70, 71, 72, 73, 76, 77, 79, 80, 82, 84, 85, 87, 88, 91, 92, 93, 94, 97, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 112, 115
Offset: 1

Views

Author

Keywords

Comments

Also (starting with 2nd term) numbers of the form 2xy+x+y for x and y positive integers. This is also the numbers of sticks needed to construct a two-dimensional rectangular lattice of unit squares. See A090767 for the three-dimensional generalization. - John H. Mason, Feb 02 2004
Note that if k is not in this sequence, then 2*k+1 is prime. - Jose Brox (tautocrona(AT)terra.es), Dec 29 2005
Values of k for which A073610(2k+3)=0; values of k for which A061358(2k+3)=0. - Graeme McRae, Jul 18 2006
This sequence also arises in the following way: take the product of initial odd numbers, i.e., the product (2n+1)!/(n!*2^n) and factor it into prime numbers. The result will be of the form 3^f(3)*5^f(5)*7^f(7)*11^f(11)... . Then f(3)/f(5) = 2, f(3)/f(7) = 3, f(3)/f(11) = 5, ... and this sequence forms (for sufficiently large n, of course) the sequence of natural numbers without 4,7,10,12,..., i.e., these numbers are what is lacking in the present sequence. - Andrzej Staruszkiewicz (uszkiewicz(AT)poczta.onet.pl), Nov 10 2007
Also "flag short numbers", i.e., number of dots that can be arranged in successive rows of K, K+1, K, K+1, K, ..., K+1, K (assuming there is a total of L > 1 rows of size K > 0). Adapting Skip Garibaldi's terms, sequence A053726 would be "flag long numbers" because those patterns begin and end with the long lines. If you convert dots to sticks, you get the lattice that John H. Mason mentioned. - Juhani Heino, Oct 11 2014
Numbers k such that (2*k)!/(2*k + 1) is an integer. - Peter Bala, Jan 24 2017
Except for a(1)=0: numbers of the form k == j (mod 2j+1), j >= 1, k > 2j+1. - Bob Selcoe, Nov 07 2017

Crossrefs

Complement of A005097.

Programs

  • Haskell
    a047845 = (`div` 2) . a014076  -- Reinhard Zumkeller, Jan 02 2013
    
  • Magma
    [(n-1)/2 : n in [1..350] | (n mod 2) eq 1 and not IsPrime(n)]; // G. C. Greubel, Oct 16 2023
    
  • Maple
    for n from 0 to 120 do
        if irem(factorial(2*n), 2*n+1) = 0 then print(n); end if;
    end do:
    # Peter Bala, Jan 24 2017
  • Mathematica
    (Select[Range[1, 231, 2], PrimeOmega[#] != 1 &] - 1)/2 (* Jayanta Basu, Aug 11 2013 *)
  • PARI
    print1(0,", ");
    forcomposite(n=1,250,if(1==n%2,print1((n-1)/2,", "))); \\ Joerg Arndt, Oct 16 2023
    
  • Python
    from sympy import primepi
    def A047845(n):
        if n == 1: return 0
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m-1>>1 # Chai Wah Wu, Jul 31 2024
  • SageMath
    [(n-1)/2 for n in (1..350) if n%2==1 and not is_prime(n)] # G. C. Greubel, Oct 16 2023
    

Formula

A193773(a(n)) > 1 for n > 1. - Reinhard Zumkeller, Jan 02 2013

Extensions

Name edited by Jon E. Schoenfield, Oct 16 2023

A098238 Number of ordered ways of writing n as sum of three primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 3, 4, 6, 6, 9, 6, 6, 10, 9, 12, 12, 12, 12, 19, 12, 21, 15, 21, 18, 30, 15, 30, 12, 30, 18, 37, 12, 39, 21, 42, 24, 46, 9, 51, 18, 48, 24, 54, 18, 66, 21, 60, 30, 67, 24, 81, 18, 75, 30, 79, 18, 87, 21, 87, 36, 93, 15, 105, 30, 105, 36, 97, 12, 120, 30, 114, 36
Offset: 0

Views

Author

Ralf Stephan, Aug 31 2004

Keywords

Crossrefs

Programs

  • Maple
    t1:=add(q^ithprime(n),n=1..1000): series(t1^3,q,1001): seriestolist(%); # N. J. A. Sloane, Sep 29 2006
  • Mathematica
    nn = 74; a = Sum[x^p, {p, Prime[Range[nn]]}]; CoefficientList[Series[a^3, {x, 0, nn}], x] (* Geoffrey Critzer, Jan 25 2015 *)

Formula

G.f.: (Sum_{k>0} x^prime(k))^3. - Vladeta Jovovic, Mar 12 2005
Third convolution of "a(n)=1 if n prime, 0 otherwise" (A010051) with itself. - Graeme McRae, Jul 18 2006

A035026 Number of times that i and 2n-i are both prime, for i = 1, ..., 2n-1.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 4, 4, 4, 5, 6, 5, 4, 6, 4, 7, 8, 3, 6, 8, 6, 7, 10, 8, 6, 10, 6, 7, 12, 5, 10, 12, 4, 10, 12, 9, 10, 14, 8, 9, 16, 9, 8, 18, 8, 9, 14, 6, 12, 16, 10, 11, 16, 12, 14, 20, 12, 11, 24, 7, 10, 20, 6, 14, 18, 11, 10, 16, 14, 15, 22, 11, 10, 24, 8, 16, 22, 9, 16, 20, 10
Offset: 1

Views

Author

Gordon R. Bower (siegmund(AT)mosquitonet.com)

Keywords

Comments

a(n) is the convolution of terms 1 to 2n of the characteristic function of the primes, A010051, with itself. Related to Goldbach's conjecture that every even number can be expressed as the sum of two primes. - T. D. Noe, Aug 01 2002
The following sequences all appear to have the same parity (with an extra zero term at the start of A010051): A010051, A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002
Total number of printer jobs in all possible schedules for n time slots in the first-come-first-served (FCFS) policy.
a(n) = Sum_{p prime < 2*n} A010051(2*n - p). - Reinhard Zumkeller, Oct 19 2011
For n > 1: length of n-th row of triangle A171637. - Reinhard Zumkeller, Mar 03 2014
a(n) = A001221(A238711(n)) = A238778(n) / n. - Reinhard Zumkeller, Mar 06 2014
From Robert G. Wilson v, Dec 15 2016: (Start)
First occurrence of k: 1, 2, 4, 5, 8, 11, 12, 17, 18, 37, 24, 53, 30, 89, 39, 71, 42, 101, 45, 179, 57, 137, 72, 193, 60, 233, ..., .
Conjectured last occurrence of k: 1, 3, 6, 19, 34, 31, 64, 61, 76, 79, 94, 83, 166, 199, 136, 181, 184, 229, 244, 271, 316, 277, 346, 313, 301, 293, ..., .
Conjectured number occurrences of k: 1, 2, 2, 3, 6, 3, 8, 4, 7, 5, 11, 5, 11, 8, 10, 3, 17, 7, 16, 3, 13, 8, 21, 4, 12, 3, 22, 7, 20, 8, 15, ..., .
Records: 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 24, 26, 28, 38, 42, 48, 54, 60, 64, 82, 88, 102, 104, 114, 116, 136, 146, 152, 166, 182, ..., .
(End)

Crossrefs

Cf. A010051. Essentially the same as A002372.
Cf. A073610.

Programs

  • Haskell
    a035026 n = sum $ map (a010051 . (2 * n -)) $
       takeWhile (< 2 * n) a000040_list
    -- Reinhard Zumkeller, Oct 19 2011
  • Maple
    A035026 := proc(n)
        local a,i ;
        a := 0 ;
        for i from 1 to 2*n-1 do
            if isprime(i) and isprime(2*n-i) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 01 2013
  • Mathematica
    For[lst={}; n=1, n<=100, n++, For[cnt=0; i=1, i<=2n-1, i++ If[PrimeQ[i]&&PrimeQ[2n-i], cnt++ ]]; AppendTo[lst, cnt]]; lst
    f[n_] := Block[{c = Boole@ PrimeQ[ n/2], p = 2}, While[ 2p < n, If[ PrimeQ[n - p], c += 2]; p = NextPrime@ p]; c];; Array[ f[ 2#] &, 90] (* Robert G. Wilson v, Dec 15 2016 *)

Formula

For n > 1, a(n) = 2*A045917(n) - A010051(n).
a(n) = A010051(n) + 2*A061357(n). - Wesley Ivan Hurt, Aug 21 2013
a(n) = A073610(2*n). - Ridouane Oudra, Sep 06 2023

Extensions

Corrected by T. D. Noe, May 05 2002

A117929 Number of partitions of n into 2 distinct primes.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Apr 03 2006

Keywords

Comments

Number of distinct rectangles with prime length and width such that L + W = n, W < L. For example, a(16) = 2; the two rectangles are 3 X 13 and 5 X 11. - Wesley Ivan Hurt, Oct 29 2017

Examples

			a(24) = 3 because we have [19,5], [17,7] and [13,11].
		

Crossrefs

Cf. A010051, A045917, A061358, A073610, A166081 (positions of 0), A077914 (positions of 2), A080862 (positions of 6).
Column k=2 of A219180. - Alois P. Heinz, Nov 13 2012

Programs

  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j-1),j=1..35): gser:=series(g,x=0,130): seq(coeff(gser,x,n),n=1..125);
    # alternative
    A117929 := proc(n)
        local a,i,p ;
        a := 0 ;
        p := 2 ;
        for i from 1 do
            if 2*p >= n then
                return a;
            end if;
            if isprime(n-p) then
                a := a+1 ;
            end if;
            p := nextprime(p) ;
        end do:
    end proc:
    seq(A117929(n),n=1..80) ; # R. J. Mathar, Oct 01 2021
  • Mathematica
    l = {}; For[n = 1, n <= 1000, n++, c = 0; For[k = 1, Prime[k] < n/2, k++, If[PrimeQ[n - Prime[k]], c = c + 1] ]; AppendTo[l, c] ] l (* Jake Foster, Oct 27 2008 *)
    Table[Count[IntegerPartitions[n,{2}],?(AllTrue[#,PrimeQ]&&#[[1]]!= #[[2]] &)],{n,120}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jul 26 2020 *)
  • PARI
    a(n)=my(s);forprime(p=2,(n-1)\2,s+=isprime(n-p));s \\ Charles R Greathouse IV, Feb 26 2014
    
  • Python
    from sympy import sieve
    from collections import Counter
    from itertools import combinations
    def aupton(max):
        sieve.extend(max)
        a = Counter(c[0]+c[1] for c in combinations(sieve._list, 2))
        return [a[n] for n in range(1, max+1)]
    print(aupton(105)) # Michael S. Branicky, Feb 16 2024

Formula

G.f.: Sum_{j>0} Sum_{i=1..j-1} x^(p(i)+p(j)), where p(k) is the k-th prime.
G.f.: A(x)^2/2 - A(x^2)/2 where A(x) = Sum_{p in primes} x^p. - Geoffrey Critzer, Nov 21 2012
a(n) = [x^n*y^2] Product_{i>=1} (1+x^prime(i)*y). - Alois P. Heinz, Nov 22 2012
a(n) = Sum_{i=2..floor((n-1)/2)} A010051(i) * A010051(n-i). - Wesley Ivan Hurt, Oct 29 2017

A121303 Triangle read by rows: T(n,k) is the number of compositions of n into k primes (i.e., ordered sequences of k primes having sum n; n>=2, k>=1).

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 2, 3, 0, 2, 3, 1, 0, 2, 4, 4, 0, 3, 6, 6, 1, 1, 0, 6, 8, 5, 0, 2, 9, 13, 10, 1, 1, 2, 6, 16, 15, 6, 0, 3, 6, 22, 25, 15, 1, 0, 2, 10, 24, 36, 26, 7, 0, 4, 9, 22, 50, 45, 21, 1, 1, 0, 12, 32, 65, 72, 42, 8, 0, 4, 12, 34, 70, 106, 77, 28, 1, 1, 2, 12, 40, 90, 150
Offset: 2

Views

Author

Emeric Deutsch, Aug 06 2006

Keywords

Comments

Row n has floor(n/2) terms.
Sum of terms in row n = A023360(n).
T(n,1) = A010051(n) (characteristic function of primes); T(n,2) = A073610(n); T(n,3) = A098238(n).
Sum_{k=1..floor(n/2)} k*T(n,k) = A121304(n).

Examples

			T(9,3) = 4 because we have [2,2,5], [2,5,2], [5,2,2] and [3,3,3].
Triangle starts:
  1;
  1;
  0, 1;
  1, 2;
  0, 1, 1;
  1, 2, 3;
  0, 2, 3, 1;
  0, 2, 4, 4;
  ...
		

Crossrefs

Programs

  • Maple
    G:=1/(1-t*sum(z^ithprime(i),i=1..30))-1: Gser:=simplify(series(G,z=0,25)): for n from 2 to 21 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 2 to 21 do seq(coeff(P[n],t,j),j=1..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    with(numtheory):
    b:= proc(n) option remember; local j; if n=0 then [1]
          else []; for j to pi(n) do zip((x, y)->x+y, %,
          [0, b(n-ithprime(j))[]], 0) od; % fi
        end:
    T:= n-> subsop(1=NULL, b(n))[]:
    seq(T(n), n=2..20);  # Alois P. Heinz, May 23 2013
  • Mathematica
    nn=20;a[x_]:=Sum[x^Prime[n],{n,1,nn}];CoefficientList[Series[1/(1-y a[x]),{x,0,nn}],{x,y}]//Grid (* Geoffrey Critzer, Nov 08 2013 *)

Formula

G.f.: 1/(1 - t*Sum_{i>=1} z^prime(i)).

A282062 Expansion of (x + Sum_{p prime, k>=1} x^(p^k))^2.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 8, 6, 7, 6, 7, 6, 9, 6, 10, 8, 7, 4, 10, 6, 9, 8, 10, 6, 12, 6, 13, 10, 13, 8, 14, 4, 11, 8, 12, 6, 12, 6, 12, 10, 11, 4, 16, 6, 15, 8, 12, 4, 17, 6, 14, 8, 11, 4, 16, 6, 13, 8, 13, 6, 18, 4, 16, 10, 14, 4, 20, 6, 15, 12, 14, 6, 18, 4, 18, 8, 13, 8, 22, 6, 17, 8, 14, 6, 24, 8, 16, 6, 13, 4
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 05 2017

Keywords

Comments

Number of ways to write n as an ordered sum of two prime powers (1 included).

Examples

			a(8) = 5 because we have  [7, 1], [5, 3], [4, 4], [3, 5] and [1, 7].
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    P:= select(isprime, [$2..N]):
    g:= x + add(add(x^(p^k),k=1..floor(log[p](N))),p=P):
    S:= series(g^2,x,N+1):
    seq(coeff(S,x,n),n=0..N); # Robert Israel, Feb 10 2017
  • Mathematica
    nmax = 95; CoefficientList[Series[(x + Sum[Floor[1/PrimeNu[k]] x^k, {k, 2, nmax}])^2, {x, 0, nmax}], x]

Formula

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

A340960 Number of ways to write n as an ordered sum of 4 primes.

Original entry on oeis.org

1, 4, 6, 8, 13, 16, 22, 24, 22, 32, 34, 40, 47, 48, 56, 68, 70, 76, 90, 84, 111, 112, 126, 120, 144, 120, 176, 140, 184, 148, 226, 168, 264, 184, 262, 196, 313, 192, 352, 208, 366, 256, 418, 240, 473, 260, 496, 324, 536, 300, 616, 308, 634, 348, 670, 348, 772, 364, 786, 412
Offset: 8

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, 4):
    seq(a(n), n=8..67);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 67; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^4, {x, 0, nmax}], x] // Drop[#, 8] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^4.
Showing 1-10 of 32 results. Next