square - prime

Joshua Zucker joshua.zucker at gmail.com
Fri Apr 1 03:11:38 CEST 2005


By the way, I just submitted two sequences,
smallest a(n) such that a(n)^2 - n is a positive prime, or 0 if no
such a(n) exists,
and
b(n) = smallest prime such that n + b(n) is a square, or 0 if no such
b(n) exists.

For example, a(9) is fine because 9 = 4^2 - 7, so a(9) = 4 and b(9) = 7,
but a(16) doesn't exist, because 16 = x^2 - p -> p = (x-4)(x+4),
so only x = 5 is a candidate, but it doesn't work.
Are there any nonsquare n so that a(n) doesn't exist?

In a case like this, should a(n)^2 appear in the database as another
sequence as well?  I thought just these two should be fine.  Does
superseeker check sqrt(sequence) if all terms of the sequence are
perfect squares?

Also, a(n) = b(n) + n, or 0, depending on whether such a decomposition exists,
and n = A001477(n).
Is it better form to just call it "n" or should I call it A001477(n)
and put in the cross-reference?
(only kidding, of course I think it's clearer to write it just as n).

Speaking of A001477, just curious: why is it listed as a "tabl"?

--Joshua Zucker

%I A105016
%S A105016 0 2 2 4 3 4 3 3 5 4 9 4 5 4 4 14 0 6 5 6 5 8 5 5 11 6 7 8 9
6 7 6 7 6 6 8 7 12 7 10 9 8 7 12 7 8 7 7 11 0 9 8 9 8 11 12 13 8 9 8
11 8 8 10 9 12 13 18 9 10 9 10 13 12 9 16 9 10 9 9 11 10 21 10 11 12
13 10 15 10 11 12 11 10 15 10 13 10 10 14 0 12 11 12 11 16 33 12 11 24
11 22 15 12 11 12 11 14 11 11 19 12 13 14 15 12
%N A105016 Smallest a(n) such that a(n)^2 - n is a positive prime, or
0 if no such a(n) exists.
%D A105016 An old ARML problem asked for the smallest n>0 such that
a(n) does not exist.
%e A105016 a(8) = 5 because 5^2 - 8 = 17 is the smallest square that
gives a prime difference.
a(16) = 0 because if x^2 - 16 is prime, then a prime equals
(x+4)(x-4), which is impossible.
%Y A105016 Cf. A105017 for the primes = a(n)^2 - n
%O A105016 0



%S A105017 0 3 2 13 5 11 3 2 17 7 71 5 13 3 2 181 0 19 7 17 5 43 3 2
97 11 23 37 53 7 19 5 17 3 2 29 13 107 11 61 41 23 7 101 5 19 3 2 73 0
31 13 29 11 67 89 113 7 23 5 61 3 2 37 17 79 103 257 13 31 11 29 97 71
7 181 5 23 3 2 41 19 359 17 37 59 83 13 137 11 31 53 29 7 131 5 73 3 2
97 0 43 19 41 17 151 983 37 13 467 11
%N A105017 Smallest prime such that n + a(n) is a square, or 0 if no
such a(n) exists
%C A105017 a(n) = A105016(n)^2 - n, if a(n) exists.
%D A105017 An old ARML problem asked for the smallest n such that a(n)
did not exist.
%e A105017 a(8) = 17 because 8 + 17 is the first square that can be
made by adding a prime to 8.
a(16) = 0 because 16 + p cannot be x^2, since then p = x^2 - 16 = (x-4)(x+4).
%Y A105017 Cf. A105016





More information about the SeqFan mailing list