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 10 results.

A178494 Partial sums of A045699.

Original entry on oeis.org

12, 29, 60, 93, 129, 181, 238, 314, 443, 577, 725, 875, 1049, 1226, 1422, 1668, 1962, 2259, 2575, 2922, 3274, 3642, 4011, 4399, 4791, 5205, 5669, 6155, 6667, 7204, 7760, 8392, 9046, 9750, 10599, 11467, 12339, 13305, 14274, 15262, 16348, 17532, 18836
Offset: 1

Views

Author

Jonathan Vos Post, May 28 2010

Keywords

Comments

Partial sums of numbers of the form p^2 + q^3, p,q primes. The subsequence of partial sums which are themselves of the form p^2 + q^3, p,q primes begins: 12, 129. The subsequence of partial sums which are themselves primes begins: 29, 181, 443, 577, 1049, 5669, 11467.

Examples

			a(5) = 12 + 17 + 31 + 33 + 36 = 129 = 2^2 + 5^3.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] A045699(i) = SUM[i=1..n] {p^2 + q^3, p,q primes}.

A086119 Numbers of the form p^3 + q^3, p, q primes.

Original entry on oeis.org

16, 35, 54, 133, 152, 250, 351, 370, 468, 686, 1339, 1358, 1456, 1674, 2205, 2224, 2322, 2540, 2662, 3528, 4394, 4921, 4940, 5038, 5256, 6244, 6867, 6886, 6984, 7110, 7202, 8190, 9056, 9826, 11772, 12175, 12194, 12292, 12510, 13498, 13718, 14364
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Examples

			133 belongs to the sequence because it can be written as 2^3 + 5^3.
		

Crossrefs

Programs

  • Mathematica
    sumList[x_List, y_List] := Module[{t = {}}, Do[t = Union[t, x[[i]] + y], {i, Length[x]}];  t]; nn = 10; Select[sumList[Prime[Range[nn]]^3, Prime[Range[nn]]^3], # < Prime[nn]^3 &]

Extensions

More terms from Alexander Adamchuk, Nov 10 2006

A045700 Primes of form p^2+q^3 where p and q are primes.

Original entry on oeis.org

17, 31, 347, 6863, 493043, 1092731, 1295033, 21253937, 22665191, 38272757, 54439943, 115501307, 904231067, 1121622323, 2738124203, 3067586681, 3301293173, 3673650011, 4549540397, 4599141251, 6507781367, 7222633241
Offset: 1

Views

Author

Keywords

Comments

p and q cannot both be odd, thus p=2 or q=2. If q=2 then we want primes of form p^2+8. But 8=-1 mod 3. Since p is prime, p=3 or == 1 or 2 mod 3. If p=1 or 2 mod 3 then 3|p^2+8, so p=3. Therefore with the exception of the first entry (3^2+8=17) this sequence is really just primes of the form q^3+4.

Examples

			a(4) = 6863 = 19^3 + 2^2.
		

Crossrefs

Cf. A045699.

Programs

  • Maple
    for n from 1 to 1000 do if (isprime((ithprime(n))^3+4)) then print((ithprime(n))^3+4,4); fi; if (isprime((ithprime(n))^2+8)) then print((ithprime(n))^2+8,8); fi; od;
  • Mathematica
    Join[{17},Select[Prime[Range[300]]^3+4,PrimeQ]] (* Harvey P. Dale, Jul 20 2011 *)
  • PARI
    list(lim)=my(v=List([17]), t); lim\=1; forprime(p=3,sqrtnint(lim\1-4,3), if(isprime(t=p^3+4), listput(v, t))); Set(v) \\ Charles R Greathouse IV, Feb 07 2017

Formula

Primes in A045699.

Extensions

Extension and comment from Joe DeMaio (jdemaio(AT)kennesaw.edu)

A045701 Number of ways n can be written as a sum of a square of a prime and a cube of a prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Examples

			a(12) = 1 because 12 = 2^2 + 2^3; a(17) = 1 because 17 = 2^3 + 3^2.
a(129) = 2 because 129 = 2^3 + 11^2 = 2^2 + 5^3.
		

Crossrefs

Formula

G.f.: (Sum_{k>=1} x^(prime(k)^2))*(Sum_{k>=1} x^(prime(k)^3)). - Ilya Gutkovskiy, Jan 06 2017

Extensions

More terms from Erich Friedman

A086120 Natural numbers of the form p^3 - q^3, where p and q are primes.

Original entry on oeis.org

19, 98, 117, 218, 316, 335, 866, 988, 1206, 1304, 1323, 1854, 1946, 2072, 2170, 2189, 2716, 3582, 4570, 4662, 4788, 4886, 4905, 5308, 5402, 5528, 6516, 6734, 6832, 6851, 7254, 9970, 10586, 10836, 11824, 12042, 12140, 12159, 12222, 17530, 17624, 18268
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Comments

To find all differences p^3 - q^3 less than N, it is required that all primes p and q up to sqrt(N/6) be tested.

Examples

			117 belongs to the sequence because it can be written as 5^3 - 2^3.
		

Crossrefs

Cf. A086119, A086121. Also see A045636, A045699.

Programs

  • Mathematica
    sumList[x_List, y_List] := (punchline = {}; Do[punchline = Union[punchline, x[[i]] + y], {i, Length[x]}]; punchline); posPart[x_List] := (punchline = {}; Do[If[x[[i]] > 0, punchline = Union[punchline, {x[[i]]}]], {i, Length[x]}]; punchline); posPart[sumList[Prime[Range[10]]^3, - Prime[Range[10]]^3]]
    nn=10^5; Union[Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[Sqrt[nn/6]]}, {j,i-1}]][[2,1]]] (* T. D. Noe, Oct 04 2010 *)
    With[{upto=20000},Select[Abs[#[[1]]-#[[2]]]&/@Subsets[Prime[ Range[ Sqrt[ upto/6]]]^3,{2}]//Union,#<=upto&]] (* Harvey P. Dale, Dec 10 2017 *)

Extensions

Corrected by T. D. Noe, Oct 04 2010

A196752 Numbers that can be represented as a sum of a square of a prime and a cube of a prime in more than one way.

Original entry on oeis.org

129, 24398, 105402, 148886, 148998, 159078, 171078, 211878, 334260, 334638, 684272, 848610, 932988, 1068420, 1092752, 1142886, 1520118, 2112540, 2770038, 2873108, 2985972, 3126060, 3309512, 3760878, 3955742, 4143422, 4331708, 4696272
Offset: 1

Views

Author

Ray Chandler, Oct 06 2011

Keywords

Examples

			a(1) = 129 = 2^3+11^2 = 2^2+5^3.
		

Crossrefs

Formula

Numbers n such that A045701(n)>1.

A086121 Positive sums or differences of two cubes of primes.

Original entry on oeis.org

16, 19, 35, 54, 98, 117, 133, 152, 218, 250, 316, 335, 351, 370, 468, 686, 866, 988, 1206, 1304, 1323, 1339, 1358, 1456, 1674, 1854, 1946, 2072, 2170, 2189, 2205, 2224, 2322, 2540, 2662, 2716, 3528, 3582, 4394, 4570, 4662, 4788, 4886, 4905, 4921, 4940, 5038
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Examples

			117 and 133 each belong to the (set) sequence because can be written as 117 = 5^3 - 2^3 and 133 = 5^3 + 2^3.
		

Crossrefs

Cf. A086119, A086120. Also see A045636, A045699.

Programs

  • Mathematica
    nn=10^6; td=Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[Sqrt[nn/6]]}, {j,i-1}]][[2,1]]; ts=Reap[Do[n=Prime[i]^3+Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[nn^(1/3)]}, {j,i}]][[2,1]]; Union[td,ts] (* T. D. Noe, Oct 04 2010 *)
    n = 100; Select[Sort@Flatten@ Table[Prime[i]^3 + (-1)^k Prime[j]^3, {i, n}, {j, i}, {k, 2}], 0 < # < (Prime[n] + 2)^3 - Prime[n]^3 &] (* Ray Chandler, Oct 05 2010 *)

Extensions

Edited by N. J. A. Sloane, Oct 05 2010 to remove a discrepancy between the terms of the sequence and the b-file. The old Mma program and b-file were wrong.

A196753 Numbers that can be represented as a sum of a square of a prime and a cube of a prime in more than two ways.

Original entry on oeis.org

60918125432, 100204679508, 184734855140, 318367666368, 404695759730, 521920922792, 755839079558, 966837148602, 1080550892412, 1088081614826, 1516213475052, 1720816433808, 1833181814670, 2680075789926, 2993867920578, 3204931381760, 3260730290378, 4432211851700
Offset: 1

Views

Author

Ray Chandler, Oct 06 2011

Keywords

Examples

			a(1) = 60918125432 = 151^3+246809^2 = 2311^3+220399^2 = 3631^3+114221^2.
		

Crossrefs

Formula

Numbers n such that A045701(n)>2.

Extensions

a(5)-a(18) from Donovan Johnson, Oct 07 2011

A217734 Primes of the form x^2 + y^3 + 1 where x and y are prime.

Original entry on oeis.org

13, 37, 53, 149, 151, 197, 317, 353, 389, 487, 557, 967, 1087, 1381, 1453, 1621, 1693, 1709, 1861, 1877, 2207, 2237, 2293, 2837, 3181, 3541, 3607, 3847, 4517, 4813, 5167, 5443, 5821, 6269, 6367, 6373, 6661, 6763, 6869, 6917, 7573, 7723, 7949, 8221, 9403, 9437
Offset: 1

Views

Author

Keywords

Comments

Terms are primes of the form 1 + A045699(n) for some n.
The first term that can be expressed two distinct ways is a(207) = 159079 = 101^2+53^3+1 = 367^2+29^3+1.
There are 27 values < 10^8 that can be expressed in two distinct ways.

Examples

			53 is in the sequence because 53 = 5^2 + 3^3 + 1 and 3, 5, and 53 are all prime numbers.
		

Crossrefs

Cf. A045700 (primes of the form p1^2 + p2^3).

Programs

  • PARI
    isa(n) = {
      my(r);
      forprime(x = 1, sqrtint(n),
          r = n - x ^ 2 - 1;
          if( ispower(r, 3, &p) && isprime(p),
              return(1)
          )
      );
      return(0)
    }
    select(isa, primes(1200))
    \\ Felix Fröhlich & David A. Corneth & Peter Luschny, Jun 26 2021
    
  • Python
    from sympy import isprime, primerange
    def aupto(lim):
        sq = list(p**2 for p in primerange(1, int(lim**(1/2))+2))
        cb = list(p**3 for p in primerange(1, int(lim**(1/3))+2))
        s3 = set(s for s in (a + b + 1 for a in sq for b in cb) if s <= lim)
        return list(filter(isprime, sorted(s3)))
    print(aupto(9999)) # Michael S. Branicky, Jun 24 2021
    
  • SageMath
    def aList(sup):
        P = [p**2 for p in prime_range(1, int(sup**(1/2))+2)]
        Q = [(p**3 + 1) for p in prime_range(1, int(sup**(1/3))+2)]
        return sorted([a+b for a in P for b in Q if a+b <= sup and is_prime(a+b)])
    print(aList(9999)) # Peter Luschny, Jun 25 2021

A217722 Primes one less than the sum of the square of a prime and the cube of a prime.

Original entry on oeis.org

11, 149, 173, 293, 367, 463, 631, 653, 1303, 1451, 1493, 1499, 1619, 1973, 2221, 2333, 2551, 2557, 2699, 3011, 3037, 3539, 3823, 3877, 4139, 4831, 4937, 5051, 5081, 5273, 5441, 6659, 6761, 6883, 6907, 7013, 7027, 7121, 7219, 7237, 7699, 8219, 8263, 8539, 8707
Offset: 1

Views

Author

Keywords

Comments

A number p is a term of this sequence iff p = q^2 + r^3 - 1 where p, q and r are all prime.
There are 1064 such numbers < 10^7.

Examples

			173 is in the sequence because 173 = 7^2 + 5^3 - 1, and 173, 7, and 5 are all prime.
		

Crossrefs

This sequence contains the prime numbers from A045699-1;
primes of the form p1^2 + p2^3: A045700;
primes of the form p1^2 + p2^3 + 1: A217734.

Programs

  • Mathematica
    max = 10^4; Select[Sort[Flatten[Table[Prime[p]^2 + Prime[q]^3 - 1, {p, PrimePi[Sqrt[max]]}, {q, PrimePi[max^(1/3)]}]]], PrimeQ[#] && # < max &] (* Alonso del Arte, Mar 22 2013 *)
Showing 1-10 of 10 results.