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.

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

This page as a plain text file.
%I A256246 #17 Sep 08 2022 08:46:11
%S A256246 1,6,10,75,140,302,463,951,989,1219,1297,1681,1776,1877,1921,2379,
%T A256246 2662,2769,2828,3499,3763,4810,4959,5424,6156,6238,6319,6829,7820,
%U A256246 8013,8108,9178,11831,13570,13939,14309,14677,17661,19456,19894,21946,22084,23148,23470
%N A256246 Numbers n such that 2*n + prime(n) is a square.
%H A256246 Zak Seidov, <a href="/A256246/b256246.txt">Table of n, a(n) for n = 1..252</a>
%e A256246 a(1) = 1 because 2*n + prime(n) = 2*1 + 2 = 4 = 2^2,
%e A256246 a(2) = 6 because 2*n + prime(n) = 2*6 + 13 = 25 = 5^2,
%e A256246 a(3) = 10 because 2*n + prime(n) = 2*10 + 29 = 49 = 7^2.
%t A256246 Transpose[Select[Table[{2 n, Prime[n]}, {n, 25000}], IntegerQ[Sqrt[Total[#]]]&]][[1]]/2 (* _Vincenzo Librandi_, Mar 21 2015 *)
%t A256246 Select[Range[25000],IntegerQ[Sqrt[2*#+Prime[#]]]&] (* _Harvey P. Dale_, Jun 17 2018 *)
%o A256246 (Magma) [n: n in [1..3*10^4] | IsSquare(2*n + NthPrime(n))]; // _Vincenzo Librandi_, Mar 21 2015
%o A256246 (PARI) for(n=1,10^4,if(issquare(2*n+prime(n)),print1(n,", "))) \\ _Derek Orr_, Mar 22 2015
%Y A256246 Cf. A064371, A256247.
%K A256246 nonn
%O A256246 1,2
%A A256246 _Zak Seidov_, Mar 20 2015