login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256246 Numbers n such that 2*n + prime(n) is a square. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
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.
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 *)
PROG
(Magma) [n: n in [1..3*10^4] | IsSquare(2*n + NthPrime(n))]; // Vincenzo Librandi, Mar 21 2015
(PARI) for(n=1, 10^4, if(issquare(2*n+prime(n)), print1(n, ", "))) \\ Derek Orr, Mar 22 2015
CROSSREFS
Sequence in context: A105157 A166386 A280881 * A246800 A269341 A348650
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 20 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)