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!)
A184778 Numbers k such that 2k + floor(k*sqrt(2)) is prime. 7
1, 4, 5, 7, 11, 14, 18, 21, 32, 41, 46, 48, 49, 56, 62, 79, 83, 86, 90, 93, 97, 114, 120, 123, 127, 130, 134, 137, 144, 165, 169, 172, 178, 181, 185, 188, 213, 220, 222, 223, 237, 243, 246, 250, 253, 257, 260, 267, 288, 302, 308, 311, 325, 329, 343, 346, 352, 360, 366, 369, 376 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
See A184774.
MATHEMATICA
r=2^(1/2); s=r/(r-1);
a[n_]:=Floor [n*r]; (* A001951 *)
b[n_]:=Floor [n*s]; (* A001952 *)
Table[a[n], {n, 1, 120}]
t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1, a[n]]], {n, 1, 600}]; t1
t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2, n]], {n, 1, 600}]; t2
t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3, n]], {n, 1, 300}]; t3
t4={}; Do[If[PrimeQ[b[n]], AppendTo[t4, b[n]]], {n, 1, 600}]; t4
t5={}; Do[If[PrimeQ[b[n]], AppendTo[t5, n]], {n, 1, 600}]; t5
t6={}; Do[If[MemberQ[t4, Prime[n]], AppendTo[t6, n]], {n, 1, 300}]; t6
(* the lists t1, t2, t3, t4, t5, t6 match the sequences
PROG
(PARI) is(n)=isprime(sqrtint(2*n^2)+2*n) \\ Charles R Greathouse IV, May 22 2017
(Python)
from itertools import count, islice
from math import isqrt
from sympy import isprime
def A184778_gen(): # generator of terms
return filter(lambda k:isprime((k<<1)+isqrt(k**2<<1)), count(1))
A184778_list = list(islice(A184778_gen(), 25)) # Chai Wah Wu, Jul 28 2022
CROSSREFS
Sequence in context: A175903 A080327 A283485 * A240118 A343211 A237133
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 21 2011
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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)