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 51-58 of 58 results.

A103273 Number of ways of writing prime(n)-1 in the form prime(i)+prime(j).

Original entry on oeis.org

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

Views

Author

Yasutoshi Kohmoto, Jan 27 2005

Keywords

Examples

			11-1=3+7=5+5, so a(5)=2.
		

Programs

Formula

a(n) = A061358(prime(n)-1). - David Wasserman, Oct 08 2005

Extensions

More terms from David Wasserman, Oct 08 2005

A104886 Sequence A048138, the number of times that a positive integer occurs as the sum of proper divisors, if Goldbach partitions (two odd primes, which account for most of the values) are ignored.

Original entry on oeis.org

0, 1, 1, 0, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 1, 1, 0, 1, 0, 1, 0, 3, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, 0, 0, 0, 2, 1, 1, 2, 1, 0, 1, 0, 2, 1, 3, 1, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 3, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 1, 0, 1, 2, 0, 2, 0, 1, 0, 0, 2
Offset: 2

Views

Author

Nathan McNew (agreatnate(AT)yahoo.com), Mar 29 2005

Keywords

Examples

			a(13)=1 because s(27)=1+3+9 and s(35)=1+5+7=13 however 35's factors 3 and 5 are a Goldbach partition, so 35 is not counted.
		

Crossrefs

Formula

a(n) = number of m such that the sum of the proper divisors of m is n, ignoring m if m is the product of two different odd primes.

A131834 Indices of records in A100949.

Original entry on oeis.org

6, 9, 11, 17, 38, 51, 62, 88, 93, 98, 122, 148, 152, 188, 222, 232, 248, 266, 272, 296, 308, 326, 388, 398, 458, 488, 500, 518, 572, 602, 686, 692, 708, 860, 912, 972, 992, 1068, 1112, 1128, 1146, 1152, 1270, 1272, 1340, 1356, 1422, 1536, 1542, 1578
Offset: 1

Views

Author

Jonathan Vos Post, Oct 04 2007

Keywords

Examples

			a(15) = 222 because there are 22 partitions of n into a prime and a semiprime and that 22 is a record.
For n = 6, 9, 11, 17, 38, 51, 62, 88, 93, 98, 122, 148, 152, 188, 222, A100949(n) = 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 16, 17, 19, 21, 22.
		

Crossrefs

Programs

  • Mathematica
    nPar[n_] := Length@ Select[Prime@ Range[ PrimePi@ n], PrimeOmega[n - #] == 2 &]; r = 0; L = {}; n = 2; While[Length[L] < 50, p = nPar[++n]; If[p > r, r = p; AppendTo[L, n]]]; L (* Giovanni Resta, Jun 19 2016 *)
    DeleteDuplicates[Table[{n,Count[Sort/@(PrimeOmega/@IntegerPartitions[n,{2}]),{1,2}]},{n,1600}],GreaterEqual[#1[[2]],#2[[2]]]&][[;;,1]]//Rest (* Harvey P. Dale, Jun 14 2024 *)

Formula

Numbers n such that the number of partitions of n into a prime and a semiprime is a record.

Extensions

Data corrected by Giovanni Resta, Jun 19 2016

A152165 Largest number which is not the sum of an n-almost prime and a prime.

Original entry on oeis.org

10, 300, 60060, 3573570, 446185740
Offset: 2

Views

Author

Jonathan Vos Post, Mar 30 2009

Keywords

Comments

All the values are conjectural and untrustworthy. - N. J. A. Sloane, Oct 05 2009
For n=1 see A061358. - N. J. A. Sloane, Oct 05 2009

Crossrefs

A330210 Numbers that can be expressed as the sum of 2 prime numbers in a prime number of different ways.

Original entry on oeis.org

10, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 38, 40, 44, 48, 52, 54, 56, 62, 64, 68, 70, 74, 76, 78, 82, 86, 94, 96, 98, 104, 112, 124, 128, 130, 136, 140, 144, 148, 156, 158, 164, 168, 174, 176, 178, 186, 188, 192, 194, 198, 206, 208, 210, 216, 218, 222, 224
Offset: 1

Views

Author

Pietro Saia, Dec 05 2019

Keywords

Examples

			24 can be expressed as the sum of 2 prime numbers in 3 different ways (5+19, 7+17, and 11+13), and 3 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 224, 2], PrimeQ@ Length@ IntegerPartitions[#, {2}, Prime@ Range@ PrimePi@ #] &] (* Giovanni Resta, Dec 06 2019 *)
  • Python
    import math
    from sympy import isprime
    def main(n):
        x = {}
        a = 1
        b = 1
        for i in range(2, n):
            x[i] = []
            while a < i:
                if a + b == i:
                    x[i].append(str(a) + "+" + str(b))
                b += 1
                if b == i:
                    a += 1
                    b = 1
            a = 1
            b = 1
        for i in x:
            x[i] = x[i][0:math.ceil(len(x[i])/2)]
        x[2] = ["1+1"]
        newdict = {}
        for i in x:
            newdict[i] = []
            for j in x[i]:
                if isprime(int(j.split("+")[0])) and isprime(int(j.split("+")[1])):
                    newdict[i].append(j)
        finaloutput = []
        for i in newdict:
            if isprime(len(newdict[i])):
                finaloutput.append(i)
        return finaloutput
    def a(n):
        x = 0
        while len(main(x)) != n:
            x += 1
        return main(x)[-1]

A334134 Number of integer-sided triangles with perimeter n whose side lengths can be written as the sum of two primes in the same number of ways.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 15 2020

Keywords

Examples

			a(4) = 0; no triangles can be made.
a(7) = 2; The two triangles [1,3,3] and [2,2,3] both have perimeter 7, and in each case, the side lengths can be written as the sum of two primes in the same number of ways (0 ways).
a(12) = 1; The triangle [4,4,4] has perimeter 12 and all of its side lengths can be written as the sum of two primes in the same number of ways (1 way).
a(15) = 3; the triangles [4,4,7], [4,5,6] and [5,5,5] all have perimeter 15. In each triangle, all the side lengths can be written as the sum of two primes in the same number of ways (1 way).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[KroneckerDelta[Sum[(PrimePi[r] - PrimePi[r - 1]) (PrimePi[k - r] - PrimePi[k - r - 1]), {r, Floor[k/2]}], Sum[(PrimePi[s] - PrimePi[s - 1]) (PrimePi[i - s] - PrimePi[i - s - 1]), {s, Floor[i/2]}], Sum[(PrimePi[t] - PrimePi[t - 1]) (PrimePi[(n - i - k) - t] - PrimePi[(n - i - k) - t - 1]), {t, Floor[(n - i - k)/2]}]]*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * [c(i) = c(k) = c(n-i-k)], where [] is the Iverson bracket and c = A061358.

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 *)

A352787 Numbers with as many divisors as Goldbach partitions.

Original entry on oeis.org

34, 46, 58, 102, 116, 122, 138, 150, 154, 162, 172, 184, 190, 196, 212, 228, 264, 266, 296, 304, 332
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 02 2022

Keywords

Comments

If it exists, a(22) > 7*10^5. - Ivan N. Ianakiev, Apr 11 2022
Numbers k such that A000005(k) = A061358(k). - Michel Marcus, Apr 12 2022

Examples

			122 is in the sequence since it has 4 divisors {1,2,61,122} and 4 Goldbach partitions (13,109), (19,103), (43,79), (61,61).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[332],DivisorSigma[0,#]==Length[Select[#-Prime[Range[PrimePi[#/2]]], PrimeQ]]&] (* Ivan N. Ianakiev, Apr 11 2022 *)
  • PARI
    nbgp(n) = my(s); forprime(q=2, n\2, s+=isprime(n-q)); s; \\ A061358
    isok(k) = numdiv(k) == nbgp(k); \\ Michel Marcus, Apr 12 2022
Previous Showing 51-58 of 58 results.