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

A064711 Numbers n such that n^2 + prime(n) is a prime.

Original entry on oeis.org

1, 2, 4, 8, 12, 14, 22, 30, 36, 38, 44, 50, 54, 60, 66, 74, 78, 84, 90, 96, 106, 134, 144, 156, 162, 168, 180, 188, 216, 222, 224, 234, 260, 264, 272, 308, 324, 336, 344, 366, 368, 374, 378, 390, 402, 406, 422, 466, 468, 476, 492, 498, 502, 516, 604, 624, 636
Offset: 1

Views

Author

Robert G. Wilson v, Oct 13 2001

Keywords

Examples

			2 is in the sequence because 2^2 + Prime(2) = 4 + 3 = 7 is a prime.
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..700] | IsPrime(n^2+NthPrime(n)) ]; // Klaus Brockhaus, Apr 12 2011
  • Mathematica
    Select[ Range[ 1000 ], PrimeQ[ #^2 + Prime[ # ] ] & ]
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(m^2 + prime(m)), write("b064711.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 23 2009
    

A188831 Primes of the form k^2 - prime(k).

Original entry on oeis.org

23, 71, 107, 263, 487, 677, 787, 1427, 1583, 2081, 3319, 5393, 8713, 10247, 11071, 12377, 18257, 20477, 24659, 26573, 29243, 29927, 33487, 34949, 37223, 37991, 41981, 51449, 60917, 64937, 66977, 71167, 83357, 85667, 99013, 100271, 109313, 110629, 118757
Offset: 1

Views

Author

Zak Seidov, Apr 11 2011

Keywords

Comments

Or, primes in A073497. Corresponding values of k in A064712.
This is to A073497 and A064712 as A184935 is to A004232 and A064711.
The two primes prime(k) and k^2-prime(k) are a Goldbach partition of k^2. - T. D. Noe, Apr 14 2011

Examples

			23 is here because 6^2 - prime(6) = 36 - 13 = 23.
		

Crossrefs

Programs

  • Magma
    [ a: k in [0..10000] | IsPrime(a) where a is k^2-NthPrime(k) ]; // Vincenzo Librandi, Apr 14 2011
  • Mathematica
    Select[Table[k^2 - Prime[k], {k, 1000}], PrimeQ] (* T. D. Noe, Apr 14 2011 *)

Formula

a(n) = A073497(A064712(n)).

A004232 a(n) = n^2 + prime(n).

Original entry on oeis.org

3, 7, 14, 23, 36, 49, 66, 83, 104, 129, 152, 181, 210, 239, 272, 309, 348, 385, 428, 471, 514, 563, 612, 665, 722, 777, 832, 891, 950, 1013, 1088, 1155, 1226, 1295, 1374, 1447, 1526, 1607, 1688, 1773, 1860, 1945, 2040, 2129, 2222, 2315, 2420, 2527, 2628, 2729
Offset: 1

Views

Author

wild(AT)edumath.u-strasbg.fr (Daniel Wild)

Keywords

Comments

Sum of reciprocals = 0.766167481.... - Cino Hilliard, Dec 31 2003
The subset of primes begins: 3, 7, 23, 83, 181, 239, 563, 1013, 1447, 1607, 2129, 2729 = A184935. The subset of squares begins: 36, 49, no more through n = 100. - Jonathan Vos Post, Feb 02 2011
No more squares using primes < 10^10 (n ~ 45 million). The naive heuristic (not really applicable here, but it's a starting point) suggests something like sqrt(log(x)) up to x. - Charles R Greathouse IV, Feb 06 2011

Crossrefs

Cf. A184935.

Programs

  • Magma
    [n^2 +NthPrime(n): n in [1..250]]; // Vincenzo Librandi, Apr 14 2011
  • Mathematica
    Table[n^2+Prime[n],{n,50}] (* Harvey P. Dale, Feb 28 2015 *)
  • PARI
    primeppwr(n) = sr=0; for(x=1,n, y=x^2+prime(x); print1(y","); sr+=1./y; ); print(); print(sr) \\ Cino Hilliard
    

Extensions

More terms from Cino Hilliard, Dec 31 2003

A229203 Primes of the form k^3 - prime(k).

Original entry on oeis.org

5, 971, 54709, 73907, 84991, 124771, 287179, 404851, 511591, 728537, 4095059, 5638691, 6433747, 6857849, 10646627, 11238001, 11850913, 12811423, 13479779, 13822489, 14170957, 16775597, 17574343, 19681267, 20121901, 21950189, 26461619, 39999391, 49025423, 49833529
Offset: 1

Views

Author

K. D. Bajpai, Sep 15 2013

Keywords

Examples

			a(2)=971: 10^3-prime(10)= 1000-29= 971 which is prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a; a:= k^3-ithprime(k); if isprime(a) then RETURN(a): fi; end: seq(KD(),k=1..1000);
  • Mathematica
    Select[Table[k^3-Prime[k],{k,1000}],PrimeQ]
  • PARI
    for(k=1, 10^3, if(ispseudoprime(KD=eval((k^3-prime(k)))), print1(KD", ")));

A212304 Primes of the form prime(n)^2 + n.

Original entry on oeis.org

5, 11, 53, 1381, 3739, 6263, 12799, 32803, 57173, 177323, 187573, 491527, 674183, 1067263, 1125899, 1142941, 1230067, 1352761, 1471567, 1745257, 1885349, 2283361, 2563453, 2779151, 3893027, 4364237, 5508757, 6933071, 7513481, 7790087, 8048981, 9370159, 11499359
Offset: 1

Views

Author

K. D. Bajpai, Oct 24 2013

Keywords

Examples

			a(3) = 53 :  prime(4)^2 + 4 = 7^2 + 4 = 49 + 4 = 53 which is prime.
a(4) = 1381 :  prime(12)^2 + 12 = 37^2 + 12 = 1369 + 12 = 1381 which is prime.
		

Crossrefs

Cf. A000040 (prime numbers).
Cf. A184935 (primes: k^2 + prime(k)).
Cf. A188831 (primes: k^2 - prime(k)).
Cf. A229203 (primes: k^3 - prime(k)).

Programs

  • Maple
    with(numtheory):KD := proc() local a; a:= (ithprime(k)^2+k); if isprime(a) then RETURN (a); fi; end: seq(KD(),k=1..1000);
  • Mathematica
    Select[Table[Prime[k]^2 + k, {k, 1000}], PrimeQ]
  • PARI
    for(k=1, 10^5, if(ispseudoprime(KD=((prime(k)^2+k))), print1(KD", ")));

A227890 Primes of the form prime(k)^2 - k.

Original entry on oeis.org

3, 7, 163, 353, 5021, 12739, 32719, 49681, 52391, 78901, 113501, 252913, 361091, 452807, 551917, 993841, 1559797, 1956979, 2193127, 3463037, 4067983, 5003837, 5138953, 6115363, 6723271, 7251857, 7447043, 7578607, 8426989, 9479801, 11295847, 12186593, 12439237
Offset: 1

Views

Author

K. D. Bajpai, Oct 26 2013

Keywords

Examples

			a(3)= 163: prime(6)^2 - 6= 13^2 - 6= 169 - 6= 163 which is prime.
a(4)= 353: prime(8)^2 - 8= 19^2 - 8= 361 - 8= 353 which is prime.
		

Crossrefs

Cf. A000040 (prime numbers).
Cf. A064713 (for the integers k).
Cf. A184935 (primes: k^2 + prime(k)).
Cf. A188831 (primes: k^2 - prime(k)).
Cf. A229203 (primes: k^3 - prime(k)).

Programs

  • Maple
    with(numtheory):KD := proc() local a; a:= (ithprime(k)^2-k); if isprime(a) then RETURN (a); fi; end: seq(KD(), k=1..1000);
  • Mathematica
    Select[Table[Prime[k]^2-k,{k,1000}],PrimeQ]
  • PARI
    for(k=1, 10^5, if(ispseudoprime(KD=((prime(k)^2-k))), print1(KD", ")));

A239743 Primes of the form prime(k)^3 + k.

Original entry on oeis.org

29, 347, 2203, 704993, 2248123, 2685653, 3442987, 81182821, 86938393, 95444081, 230346509, 1064332433, 1298596753, 1829276767, 2202074113, 3449796071, 4306879141, 6740558659, 8205739219, 9649993009, 11650768499, 14225261327, 15124198183, 19968681493, 21415471837
Offset: 1

Views

Author

K. D. Bajpai, Mar 26 2014

Keywords

Examples

			29 is in the sequence because prime(2)^3 + 2 = 29, which is prime.
347 is in the sequence because prime(4)^3 + 4 = 347, which is prime.
		

Crossrefs

Cf. A000040 (prime numbers).
Cf. A184935 (primes: k^2 + prime(k)).
Cf. A188831 (primes: k^2 - prime(k)).
Cf. A229203 (primes: k^3 - prime(k)).
Cf. A061068 (primes: prime(k) + k)
Cf. A212304 (primes: prime(k)^2 + k).

Programs

  • Magma
    [q: k in [1..1000] | IsPrime(q) where q is NthPrime(k)^3+k]; // Bruno Berselli, Mar 26 2014
  • Maple
    KD := proc() local a,b; a:= ithprime(n); b:=a^3+n; if isprime(b) then RETURN (b); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    Select[Table[Prime[k]^3 + k, {k, 1000}], PrimeQ]
  • PARI
    s=[]; for(k=1, 1000, n=prime(k)^3+k; if(isprime(n), s=concat(s, n))); s \\ Colin Barker, Mar 26 2014
    
Showing 1-7 of 7 results.