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

A281875 Least k such that phi(k) is the sum of two primes in exactly n ways, or 0 if no such k exists.

Original entry on oeis.org

1, 5, 11, 23, 37, 65, 61, 79, 103, 161, 127, 157, 143, 199, 181, 307, 277, 313, 241, 211, 409, 341, 379, 487, 331, 623, 577, 551, 463, 527, 421, 571, 601, 673, 829, 757, 877, 997, 1571, 691, 1039, 631, 1009, 961, 869, 967, 1543, 989, 1057, 1247, 2411, 899, 991, 1303, 1147, 1231, 1999
Offset: 0

Views

Author

Altug Alkan, Feb 01 2017

Keywords

Comments

Note that this sequence is not the subsequence of A037143; i.e., a(318) = 7^3 * 47.

Examples

			a(3) = 23 because phi(23) = 22 = 3 + 19 = 5 + 17 = 11 + 11 and 23 is the least number with this property.
		

Crossrefs

Extensions

a(0) = 1 prepended by Chai Wah Wu, Feb 03 2017

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

A381333 Smallest integer that is the sum of a prime and the square of a prime in n or more ways.

Original entry on oeis.org

6, 11, 56, 176, 188, 362, 398, 668, 1448, 1448, 1592, 2390, 3372, 3632, 4532, 6342, 6342, 6368, 6368, 10632, 12920, 12920, 12942, 19502, 23168, 25038, 25038, 25038, 25472, 32238, 32238, 39800, 39800, 39800, 53360, 64998, 72740, 72740, 72740, 81542, 82880, 82880
Offset: 1

Views

Author

Chai Wah Wu, Feb 20 2025

Keywords

Comments

Subsequence of A081053. All terms are even except for a(2) = 11.

Examples

			a(1) = 6 as 6 = 2 + 2^2.
a(2) = 11 as 11 = 7 + 2^2 = 2 + 3^2.
a(3) = 56 as 56 = 47 + 3^2 = 31 + 5^2 = 7 + 7^2.
a(4) = 176 as 176 = 167 + 3^2 = 151 + 5^2 = 127 + 7^2 = 7 + 13^2.
a(5) = 188 as 188 = 179 + 3^2 = 163 + 5^2 = 139 + 7^2 = 67 + 11^2 = 19 + 13^2.
a(6) = 362 as 362 = 353 + 3^2 = 337 + 5^2 = 313 + 7^2 = 241 + 11^2 = 193 + 13^2 = 73 + 17^2.
		

Crossrefs

Programs

  • PARI
    f(k) = my(nb=0); forprime(p=2, sqrtint(k), if (isprime(k-p^2), nb++);); nb;
    a(n) = my(k=1); while (f(k) < n, k++); k; \\ Michel Marcus, Feb 21 2025
  • Python
    from itertools import count
    from math import isqrt
    from sympy import isprime, primerange
    def A381333(n):
        for m in count(1):
            c = 0
            for p in primerange(isqrt(m)+1):
                if isprime(m-p**2):
                    c += 1
                if c>=n:
                    return m
    

A055065 Smallest even number that is the sum of distinct primes in exactly n ways.

Original entry on oeis.org

8, 16, 24, 36, 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
Offset: 1

Views

Author

Jud McCranie, Jun 12 2000

Keywords

Comments

Proposed by G. L. Honaker, Jr.

Examples

			16 is the sum of distinct primes in exactly 2 ways (3 + 13 and 5 + 11), and is the smallest such number, so a(2) = 16.
		

Crossrefs

Cf. A001172.

A087746 Erroneous version of A023036.

Original entry on oeis.org

5, 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: 1

Views

Author

Lekraj Beedassy, Oct 02 2003

Keywords

Comments

a(n) = A001172(n) for n > 1. - Reinhard Zumkeller, Oct 18 2004

Extensions

More terms from Reinhard Zumkeller, Oct 18 2004
Marked dead by Franklin T. Adams-Watters, Mar 14 2011

A281827 Least number k such that k is the sum of two primes in exactly n ways, where both primes are of the form x^2 + y^2, or -1 if no such k exists.

Original entry on oeis.org

0, 4, 34, 58, 102, 114, 186, 282, 246, 210, 354, 390, 330, 426, 462, 666, 906, 774, 750, 690, 630, 870, 1026, 990, 1122, 1134, 1110, 1050, 1170, 1554, 1914, 1290, 1530, 1650, 1470, 1770, 1830, 2142, 1710, 2070, 2874, 1950, 2250, 1890, 2838, 2370, 2550, 2490, 2430, 3354, 2670, 3726
Offset: 0

Views

Author

Altug Alkan, Jan 31 2017

Keywords

Examples

			a(2) = 34 because 34 = 5 + 29 = 17 + 17; 5, 17, 29 are primes of the form x^2 + y^2 and 34 is the least number with this property.
		

Crossrefs

Previous Showing 11-16 of 16 results.