

A230546


Least positive integer k <= n such that 2*k^21 is a prime and n  k is a square, or 0 if such an integer k does not exist.


1



0, 2, 2, 3, 4, 2, 3, 4, 8, 6, 2, 3, 4, 10, 6, 7, 8, 2, 3, 4, 17, 6, 7, 8, 21, 10, 2, 3, 4, 21, 6, 7, 8, 18, 10, 11, 21, 2, 3, 4, 25, 6, 7, 8, 36, 10, 11, 39, 13, 25, 2, 3, 4, 18, 6, 7, 8, 22, 10, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

By the conjecture in A230494, we should have a(n) > 0 for all n > 1.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..10000


EXAMPLE

a(4) = 3 since neither 4  1 = 3 nor 4  2 = 2 is a square, but 4  3 = 1 is a square and 2*3^2  1 = 17 is a prime.


MATHEMATICA

SQ[n_]:=IntegerQ[Sqrt[n]]
Do[Do[If[PrimeQ[2k^21]&&SQ[nk], Print[n, " ", k]; Goto[aa]], {k, 1, n}];
Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 60}]


CROSSREFS

Cf. A000040, A000290, A066049, A230351, A230362, A230493, A230494.
Sequence in context: A236241 A127731 A159978 * A286617 A328446 A257062
Adjacent sequences: A230543 A230544 A230545 * A230547 A230548 A230549


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Oct 23 2013


STATUS

approved



