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.

A056897 Smallest square where a(n)+n is prime.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 49, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 25, 4, 9, 16, 1, 0, 25, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 81, 4, 1, 0, 1, 0, 9, 4, 25, 36, 1, 0, 9, 16, 1, 0, 25, 4, 81, 16, 1, 0, 49, 16, 9, 4, 9
Offset: 0

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(8)=9 since 9 is a square and 9+8=7 which is a prime
		

Crossrefs

Programs

  • Mathematica
    With[{sqs=Range[0,20]^2},Table[SelectFirst[sqs,PrimeQ[n+#]&],{n,100}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 07 2016 *)

Formula

a(n) =A056896(n)-n =A056898(n)^2