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 41-48 of 48 results.

A303403 Even numbers that are not the sum of two prime-indexed primes.

Original entry on oeis.org

2, 4, 12, 18, 24, 26, 30, 32, 38, 40, 50, 54, 56, 60, 66, 68, 74, 80, 92, 96, 102, 104, 106, 110, 116, 122, 128, 136, 146, 148, 152, 154, 156, 164, 170, 172, 178, 180, 200, 204, 206, 212, 226, 230, 234, 248, 256, 260, 264, 268, 276, 290, 292, 296, 298, 302
Offset: 1

Views

Author

Amiram Eldar, May 13 2018

Keywords

Comments

Bayless et al. conjectured that every even number larger than 80612 is the sum of two prime-indexed primes. If the conjecture is true then this sequence is finite with 733 terms.
Similarly, it appears that 322704332 is the largest of the 1578727 even numbers that cannot be written as prime(prime(prime(i))) + prime(prime(prime(j))). - Giovanni Resta, May 31 2018

Examples

			20 is not in the sequence since 20 = 17 + 3 = prime(7) + prime(2).  2 and 7 are primes, so 3 and 17 are prime-indexed primes. - _Michael B. Porter_, May 21 2018
		

Crossrefs

Equals 2*A174682. - Michel Marcus, May 18 2018

Programs

  • Mathematica
    pipQ[n_]:=PrimeQ[n]&&PrimeQ[PrimePi[n]]; s1falsifiziertQ[s_]:= Module[{ip=IntegerPartitions[s, {2}], widerlegt=False}, Do[If[pipQ[ip[[i, 1]] ] ~And~ pipQ [ip[[i, 2]] ], widerlegt = True; Break[]], {i, 1, Length[ip]}]; widerlegt]; Select[Range[2500],EvenQ[#]&& s1falsifiziertQ[ # ]==False&] (* after Michael Taktikos at A014092 *)
    (* or *) p = Prime@ Prime@ Range@ PrimePi@ PrimePi@ 302; Select[Range[2, 302, 2], IntegerPartitions[#, {2}, p] == {} &] (* Giovanni Resta, May 31 2018 *)
  • PARI
    isok(n) = {if (n % 2, return (0)); forprime(p=2, n/2, if (isprime(primepi(p)) && isprime(n-p) && isprime(primepi(n-p)), return (0));); return (1);} \\ Michel Marcus, May 18 2018

A352296 Smallest number that can be expressed as the sum of two primes in exactly n ways or -1 if no such number exists.

Original entry on oeis.org

1, 4, 10, 22, 34, 48, 60, 78, 84, 90, 114, 144, 120, 168, 180, 234, 246, 288, 240, 210, 324, 300, 360, 474, 330, 528, 576, 390, 462, 480, 420, 570, 510, 672, 792, 756, 876, 714, 798, 690, 1038, 630, 1008, 930, 780, 960, 870, 924, 900, 1134, 1434, 840, 990, 1302
Offset: 0

Views

Author

Chai Wah Wu, Mar 11 2022

Keywords

Comments

Conjecture: a(n) != -1 for all n.
If n > 0 and a(n) != -1, then a(n) is even.
a(0) = A014092(1)
a(1) = A067187(1)
a(2) = A067188(1)
a(3) = A067189(1)
a(4) = A067190(1)
a(5) = A067191(1)
a(6) = A066722(1)
a(7) = A352229(1)
a(8) = A352230(1)
a(9) = A352231(1)
a(10) = A352233(1)

Crossrefs

Programs

  • Mathematica
    f[n_] := Count[IntegerPartitions[n, {2}], ?(And @@ PrimeQ[#] &)]; seq[max] :=  Module[{s = Table[0, {max}], n = 1, c = 0, k}, While[c < max, k = f[n]; If[k < max && s[[k + 1]] == 0, c++; s[[k + 1]] = n]; n++]; s]; seq[50] (* Amiram Eldar, Mar 11 2022 *)
  • Python
    from itertools import count
    from sympy import nextprime
    def A352296(n):
        if n == 0:
            return 1
        pset, plist, pmax = {2}, [2], 4
        for m in count(2):
            if m > pmax:
                plist.append(nextprime(plist[-1]))
                pset.add(plist[-1])
                pmax = plist[-1]+2
            c = 0
            for p in plist:
                if 2*p > m:
                    break
                if m - p in pset:
                    c += 1
            if c == n:
                return m

A062303 Number of ways writing the n-th prime as a sum of two nonprimes.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 6, 7, 8, 9, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 26, 27, 27, 33, 34, 36, 37, 40, 41, 42, 44, 45, 47, 49, 50, 53, 54, 54, 55, 59, 64, 65, 66, 66, 68, 69, 72, 74, 76, 78, 79, 80, 81, 82, 85, 91, 92, 93, 93, 99, 101, 105, 106, 106, 108
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			n=10,p(10)=29 has 14 partitions of form a+b=29; 1+28=4+25=8+21=9+20=14+15 are the 5 relevant partitions, so a(10)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; Do[If[i + j == Prime[n] && ! PrimeQ[i] && ! PrimeQ[j], c = c + 1], {i, Prime[n] - 1}, {j, i}]; c, {n, 72}] (* Jayanta Basu, Apr 22 2013 *)
    cnpQ[{a_,b_}]:=(!PrimeQ[a]&&CompositeQ[b])||(!PrimeQ[b]&&CompositeQ[a]); Join[{1},Table[Length[Select[IntegerPartitions[Prime[n],{2}],cnpQ]],{n,2,80}]] (* Harvey P. Dale, Sep 30 2018 *)

Formula

A062610(A000040(n)) = number of [nonprime+composite] partitions of p(n).

Extensions

Offset and name corrected by Sean A. Irvine, Mar 25 2023

A178400 Sums of two primes, an array by antidiagonals.

Original entry on oeis.org

4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 16, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 28, 28, 28, 28, 30, 30, 30, 30, 30, 30, 31
Offset: 1

Views

Author

Clark Kimberling, Dec 21 2010

Keywords

Comments

The joint-rank array of this array is A178431.

Examples

			Northwest corner:
4....5....7....9...13...
5....6....8...10...12...
7....8...10...12...16...
9...10...12...14...14...
T(1,1)=2+2=4.
		

Crossrefs

Formula

T(i,j)=p(i)+p(j), where p=(2,3,5,7,...)=A000040.

A269801 Total sum of the divisors of the primes p,q such that n=p+q and p>=q.

Original entry on oeis.org

0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 24, 0, 14, 15, 32, 17, 36, 0, 40, 21, 44, 23, 72, 0, 78, 27, 84, 0, 60, 0, 96, 33, 68, 35, 144, 0, 152, 0, 80, 41, 126, 0, 176, 45, 138, 47, 192, 0, 250, 51, 208, 0, 162, 0, 280, 57, 174, 0, 240, 0, 372, 63, 192, 65, 330, 0
Offset: 0

Views

Author

Wesley Ivan Hurt, Mar 05 2016

Keywords

Examples

			a(5) = 7; Since 5 can be expressed in one way as the sum of the two primes 2 and 3, we add the sum of their divisors separately: sigma(2) + sigma(3) = 3 + 4 = 7.
a(10) = 24; Since 10 can be expressed in two ways as the sum of two primes, we add the sum of the divisors of each prime p and q: 10 = 3+7 = 5+5, so sigma(3) + sigma(7) + sigma(5) + sigma(5) = 4 + 8 + 6 + 6 = 24.
		

Crossrefs

Cf. A000203 (sigma), A010051, A014092, A061358.

Programs

  • Maple
    with(numtheory): A269801:=n->(n+2)*sum((pi(i)-pi(i-1))*(pi(n-i)-pi(n-i-1)), i=2..floor(n/2)): seq(A269801(n), n=0..100);
  • Mathematica
    Table[(n+2) Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, 2, Floor[n/2]}], {n, 0, 80}]
  • PARI
    a(n) = sum(i=0, n\2, if (isprime(i) && isprime(n-i), sigma(i)+sigma(n-i))); \\ Michel Marcus, Mar 05 2016

Formula

a(n) = (n+2) * A061358(n).
a(n) = (n+2) * Sum_{i=2..floor(n/2)} A010051(i) * A010051(n-i).
a(n) = Sum_{i=2..floor(n/2)} (A000203(i) + A000203(n-i)) * A010051(i) * A010051(n-i).

A290136 Positive numbers that are not the sum of two nonprime squarefree numbers (A000469).

Original entry on oeis.org

1, 3, 4, 5, 6, 8, 9, 10, 13, 14, 17, 18, 19, 26, 33, 38, 46, 62, 82
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 20 2017

Keywords

Comments

The sequence is conjectured to be complete.

Crossrefs

Programs

  • Mathematica
    nmax = 82; f[x_] := Sum[Boole[SquareFreeQ[k] && PrimeNu[k] != 1] x^k, {k, 1, nmax}]^2; b = Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]; c = Complement[Range[nmax], b][[1 ;; 19]]

A200677 Smallest semiprime such that the sum of the two prime factors equals n, or zero if impossible.

Original entry on oeis.org

0, 0, 0, 4, 6, 9, 10, 15, 14, 21, 0, 35, 22, 33, 26, 39, 0, 65, 34, 51, 38, 57, 0, 95, 46, 69, 0, 115, 0, 161, 58, 87, 62, 93, 0, 155, 0, 217, 74, 111, 0, 185, 82, 123, 86, 129, 0, 215, 94, 141, 0, 235, 0, 329, 106, 159, 0, 265, 0, 371, 118, 177, 122, 183, 0
Offset: 1

Views

Author

Michel Lagneau, Nov 20 2011

Keywords

Comments

For n > 3, a(n) = 0 if n-2 is an odd composite.
The sequence without zeros is a subsequence of A189553. - Manfred Scheucher, Aug 08 2015
The two prime factors are not necessarily distinct; a(6) = 9, both of whose prime factors are 3s. - Jon E. Schoenfield, Aug 09 2015

Examples

			a(10) = 21 because 21 = 3*7 and 3+7 = 10, and there is no semiprime smaller than 21 whose two prime factors sum to 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 65 do:ii:=0:for k from 1 to 1000 while(ii=0)do:m1:=bigomega(k):x:=factorset(k): m2:=nops(x):if m1=2 and m2=2 and x[1]+x[2]= n or m1=2 and m2=1 and 2*x[1]= n then ii:=1: printf(`%d, `,k):else fi:od:if ii=0 then printf(`%d, `,0):else fi:od:

Formula

a(A014091(n)) > 0; a(A014092(n)) = 0. - Michel Marcus, Aug 10 2015

Extensions

Edited by Jon E. Schoenfield and Manfred Scheucher, Aug 09 2015

A339020 Largest value of (p*q mod n), for primes p and q, where p + q = n and p <= q (or 0 if no such primes exist).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 3, 7, 5, 5, 0, 11, 9, 7, 11, 7, 0, 11, 15, 11, 17, 19, 0, 23, 21, 17, 0, 19, 0, 29, 27, 23, 29, 25, 0, 35, 0, 27, 35, 39, 0, 41, 39, 39, 41, 37, 0, 47, 45, 41, 0, 43, 0, 47, 51, 55, 0, 53, 0, 59, 57, 53, 59, 55, 0, 65, 0, 59, 65, 69, 0, 71, 69, 65, 71, 71, 0, 53
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 22 2020

Keywords

Comments

a(m) = 0 for m in A014092.

Examples

			a(14) = 7; There are two partitions of 14 into two primes, (3,11) and (7,7). Since (3*11 mod 14) = 5 and (7*7 mod 14) = 7, then 7 is the largest. Therefore, a(14) = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, 0, Max[Table[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]) Mod[i (n - i), n], {i, Floor[n/2]}]]], {n, 100}]
    Table[Max[Mod[Times@@#,n]&/@Select[IntegerPartitions[n,{2}],AllTrue[#,PrimeQ]&]],{n,80}]/.(-\[Infinity]->0) (* Harvey P. Dale, Mar 24 2024 *)
Previous Showing 41-48 of 48 results.