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

A256246 Numbers n such that 2*n + prime(n) is a square.

Original entry on oeis.org

1, 6, 10, 75, 140, 302, 463, 951, 989, 1219, 1297, 1681, 1776, 1877, 1921, 2379, 2662, 2769, 2828, 3499, 3763, 4810, 4959, 5424, 6156, 6238, 6319, 6829, 7820, 8013, 8108, 9178, 11831, 13570, 13939, 14309, 14677, 17661, 19456, 19894, 21946, 22084, 23148, 23470
Offset: 1

Views

Author

Zak Seidov, Mar 20 2015

Keywords

Examples

			a(1) = 1 because 2*n + prime(n) = 2*1 + 2 = 4 = 2^2,
a(2) = 6 because 2*n + prime(n) = 2*6 + 13 = 25 = 5^2,
a(3) = 10 because 2*n + prime(n) = 2*10 + 29 = 49 = 7^2.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..3*10^4] | IsSquare(2*n + NthPrime(n))]; // Vincenzo Librandi, Mar 21 2015
    
  • Mathematica
    Transpose[Select[Table[{2 n, Prime[n]}, {n, 25000}], IntegerQ[Sqrt[Total[#]]]&]][[1]]/2 (* Vincenzo Librandi, Mar 21 2015 *)
    Select[Range[25000],IntegerQ[Sqrt[2*#+Prime[#]]]&] (* Harvey P. Dale, Jun 17 2018 *)
  • PARI
    for(n=1,10^4,if(issquare(2*n+prime(n)),print1(n,", "))) \\ Derek Orr, Mar 22 2015
Showing 1-1 of 1 results.