OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
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
(Python)
from math import isqrt
from itertools import count, islice
from sympy import isprime
def A184777_gen(): # generator of terms
return filter(isprime, ((k<<1)+isqrt(k**2<<1) for k in count(1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 21 2011
STATUS
approved