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

A064712 Numbers k such that k^2 - prime(k) is a prime.

Original entry on oeis.org

6, 10, 12, 18, 24, 28, 30, 40, 42, 48, 60, 76, 96, 104, 108, 114, 138, 146, 160, 166, 174, 176, 186, 190, 196, 198, 208, 230, 250, 258, 262, 270, 292, 296, 318, 320, 334, 336, 348, 356, 358, 362, 370, 372, 376, 382, 400, 420, 444, 454, 462, 472, 488, 494, 504
Offset: 1

Views

Author

Robert G. Wilson v, Oct 13 2001

Keywords

Comments

A073497(a(n)) is a prime. - Zak Seidov, Apr 11 2011

Examples

			6 is in the sequence because 6^2 - prime(6) = 36 - 13 = 23 is a prime.
		

Programs

  • Magma
    [n: n in [6..1000] | IsPrime(n^2-NthPrime(n))]; // Vincenzo Librandi, Apr 14 2011
  • Mathematica
    Select[ Range[ 6,1000,2 ], PrimeQ[ #^2 - Prime[ # ] ] & ]
  • PARI
    n=0; forstep (m=6, 10^9, 2, if (isprime(m^2 - prime(m)), write("b064712.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)).

A108753 Difference between the n-th partial sum of the squares (A000330) and the n-th partial sum of the primes (A007504).

Original entry on oeis.org

-1, 0, 4, 13, 27, 50, 82, 127, 185, 256, 346, 453, 581, 734, 912, 1115, 1345, 1608, 1902, 2231, 2599, 3004, 3450, 3937, 4465, 5040, 5666, 6343, 7075, 7862, 8696, 9589, 10541, 11558, 12634, 13779, 14991, 16272, 17626, 19053, 20555, 22138, 23796, 25539, 27367
Offset: 1

Views

Author

Alexandre Wajnberg, Jun 23 2005

Keywords

Comments

Numbers congruent to {0, 3, 8, 11} mod 12.

Examples

			a(4) = A000330(4) - A007504(4) = (1 + 4 + 9 + 16) - (2 + 3 + 5 + 7) = 30 - 17 = 13.
		

Crossrefs

Partial sums of A073497.

Programs

  • Mathematica
    f[n_] := n(n + 1)(2n + 1)/6 - Sum[Prime[i], {i, n}]; Table[ f[n], {n, 15}] (* Robert G. Wilson v, Jun 25 2005 *)
    #[[1]]-#[[2]]&/@With[{nn=50},Thread[{Accumulate[Range[nn]^2], Accumulate[ Prime[ Range[nn]]]}]] (* Harvey P. Dale, May 07 2013 *)

Extensions

Edited and extended by Robert G. Wilson v, Jun 25 2005
Showing 1-3 of 3 results.