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-3 of 3 results.

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

A176699 Fermi-Dirac composite numbers that are not a sum of two Fermi-Dirac primes (A050376).

Original entry on oeis.org

145, 187, 205, 217, 219, 221, 247, 301, 325, 343, 415, 427, 475, 517, 535, 553, 555, 583, 637, 667, 671, 697, 715, 781, 783, 793, 795, 805, 807, 817, 835, 847, 851, 871, 895, 901, 905, 925, 959, 1003, 1005, 1027, 1045, 1057, 1059, 1075, 1081, 1135, 1141, 1147
Offset: 1

Views

Author

Vladimir Shevelev, Apr 24 2010, Apr 26 2010

Keywords

Comments

We define a Fermi-Dirac composite number as a positive integer with at least two factors in its factorization over distinct terms of A050376.
They are those c for which A064547(c) >= 2, namely c= 6, 8, 10, 12,..., 62, 63, 64, 65, ..., or the complement of A050376 with respect to the natural numbers > 1.

Examples

			291 = 3*97 is a Fermi-Dirac composite number, equal to 289+2, the sum of two Fermi-Dirac primes. Therefore 291 is not in the sequence.
		

References

  • Vladimir S. Shevelev, Multiplicative functions in the Fermi-Dirac arithmetic, Izvestia Vuzov of the North-Caucasus region, Nature Sciences 4 (1996), 28-43.

Crossrefs

Programs

  • Maple
    A064547 := proc(n) f := ifactors(n)[2] ; a := 0 ; for p in f do a := a+wt(op(2, p)) ; end do: a ; end proc:
    A050376 := proc(n) local a; if n = 1 then 2; else for a from procname(n-1)+1 do if A064547(a) = 1 then return a; end if; end do: end if; end proc:
    isA176699 := proc(n) local pi,q ; if A064547(n) < 2 then return false; end if; for pi from 1 do if A050376(pi) > n then return true; else q := n-A050376(pi) ; if A064547(q) = 1 then return false; end if; end if; end do; end proc:
    for n from 2 to 1000 do if isA176699(n) then printf("%d,\n",n) ; end if; end do: # R. J. Mathar, Jun 16 2010
  • Mathematica
    pow2Q[n_] := n == 2^IntegerExponent[n, 2]; fdpQ[n_] := PrimePowerQ[n] && pow2Q[FactorInteger[n][[1, 2]]]; With[{m = 1200}, p = Select[Range[m], fdpQ]; Complement[Range[m], Join[{1}, p, Plus @@@ Subsets[p, {2}]]]] (* Amiram Eldar, Oct 05 2023 *)

Extensions

Edited and extended by R. J. Mathar, Jun 16 2010
More terms from Amiram Eldar, Oct 05 2023

A176568 Nonnegative nonprimes which are neither the difference, nor the sum, nor the product of two distinct primes.

Original entry on oeis.org

0, 117, 121, 207, 245, 289, 297, 325, 343, 363, 405, 425, 475, 483, 495, 513, 529, 531, 625, 627, 637, 665, 705, 715, 747, 765, 777, 783, 801, 805, 833, 845, 847, 867, 873, 891, 897, 903, 915, 925, 957, 961, 963, 987, 1001, 1005, 1025, 1045, 1075, 1083, 1113, 1143, 1175, 1197, 1209, 1245, 1265
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 20 2010

Keywords

Crossrefs

Formula

A171469 INTERSECT A007921. [R. J. Mathar, May 02 2010]

Extensions

Corrected definition and values (inserted 289, 343 ...) - R. J. Mathar, May 02 2010
Showing 1-3 of 3 results.