Displaying 1-4 of 4 results found.
page
1
Lesser of consecutive primes whose average is a perfect power.
+10
3
3, 7, 61, 79, 139, 223, 317, 439, 619, 1087, 1669, 1723, 2593, 3593, 4093, 5179, 6079, 8461, 12541, 13687, 16633, 17573, 19037, 19597, 21943, 25261, 27211, 28219, 29581, 36857, 38011, 39199, 45361, 46649, 47521, 51977, 56167, 74527, 87013, 88801, 91807, 92413, 95479
EXAMPLE
4093 is in the sequence because 4093 and 4099 are consecutive primes and (4093 + 4099)/2 = 4096 = 2^12.
MATHEMATICA
Select[Partition[Prime[Range[2, 10^4]], 2, 1], GCD @@ FactorInteger[(First[#] + Last[#])/2][[;; , 2]] > 1 &][[;; , 1]] (* Amiram Eldar, Jul 04 2022 *)
PROG
(PARI) for(i=3, 10^5, if(isprime(i), k=(i+nextprime(i+1))/2; if(ispower(k), print1(i, ", "))))
Smaller of the two consecutive primes whose sum is a triangular number.
+10
2
17, 37, 59, 103, 137, 149, 313, 467, 491, 883, 911, 1277, 1423, 1619, 1783, 2137, 2473, 2729, 4127, 4933, 5437, 5507, 6043, 6359, 10039, 10453, 11717, 13397, 15809, 17489, 20807, 21821, 23027, 27631, 28307, 28813, 29669, 33029, 36947, 39103, 44203, 48281
MAPLE
f:= proc(n) local m, p, q;
m:= n*(n+1)/2;
p:= prevprime(ceil(m/2));
q:= nextprime(p);
if p+q=m then p fi
end proc:
MATHEMATICA
tri[n_] := IntegerQ[Sqrt[1 + 8 n]]; t = {}; p1 = 2; While[Length[t] < 50, p2 = NextPrime[p1]; If[tri[p1 + p2], AppendTo[t, p1]]; p1 = p2]; t (* T. D. Noe, May 28 2013 *)
CROSSREFS
Cf. A175132 (numbers n such that sum of two consecutive primes is triangular(n)).
Cf. A181902 and A154634 (average of two consecutive primes is a triangular number).
Cf. A075190 and A225195 (average of two consecutive primes is a square).
Lesser of consecutive primes whose average is a perfect cube.
+10
2
61, 1723, 4093, 17573, 21943, 46649, 110587, 195103, 287491, 314423, 405221, 474547, 1061189, 1191013, 1404919, 1601609, 1906621, 2000371, 2146687, 2196979, 3241783, 3511799, 4912991, 5268017, 6229501, 6751267, 6858997, 7077883, 11239421, 20346407, 21951997, 26198063
EXAMPLE
1723 is in the sequence because it is prime, nextprime(1723) = 1733, and average(1723,1733) = 1728 = 12^3.
MATHEMATICA
Select[Partition[Prime[Range[2, 10^5]], 2, 1], IntegerQ[Surd[(First[#] + Last[#])/2, 3]] &][[;; , 1]] (* Amiram Eldar, Jul 04 2022 *)
PROG
(PARI) {for(i=3, 3*10^7, if(isprime(i), k=(i+nextprime(i+1))/2; if(ispower(k, 3), print1(i, ", "))))}
For n >= 1, a(n) is the least prime p such that the arithmetic mean of (n + 1) consecutive primes starting with p is a perfect square, or a(n) = -1 if no such p exists.
+10
0
3, 2393, 5, 827, 53, 271, 1063, 23993, 197, 29, 193, 2143, 359, 6829, 397, 17, 433, 661, 2837, 25171, 13597, 563, 10301, 1814233, 51427, 6781, 316817, 7477, 71, 238919, 11491, 3109, 42293, 38653, 6263, 13043, 474497, 21433, 13, 21419, 16963, 5119, 705209, 183761
COMMENTS
Does a(n) exists for all n >= 1 ?
Let s(n) be the sum of n + 1 consecutive primes starting with a(n). Then s(n)/(n+1) = m^2 for some positive integer m.
This means s(n) = (n + 1) * m^2. If n is even then m is odd if a(n) > 2.
As s(n) >= A007504(n) we have m^2 >= s(n)/(n+1) >= A007504(n)/(n+1) i.e. m >= sqrt( A007504(n)/(n+1)). So for some m we can see if m^2 * (n+1) is the sum of n+1 consecutive primes and if so a(n) is the smallest prime of these n+1 primes after testing all candidates up to m. (End)
s(n) = (n + 1)* a(n) + Sum_{i=0..(n-1)} (n-i)*g(i+1), thus we have Sum_{i=0..(n-1)} (n-i)*g(i+1) = (m^2 - a(n)) * (n + 1), g(j) are the n gaps between n + 1 consecutive primes. (End)
EXAMPLE
n = 2: we search for the least prime(i) such that (prime(i) + prime(i + 1) + prime(i + 2))/3 = m^2, m an integer. This is valid for (2393 + 2399 + 2411)/3 = 49^2 thus a(2) = 2393.
PROG
(PARI) isok(x) = (denominator(x)==1) && issquare(x);
a(n) = my(k=1); while (!isok((vecsum(primes(k+n))-vecsum(primes(k-1)))/(n+1)), k++); prime(k); \\ Michel Marcus, Oct 16 2023
(PARI) a(n) = {my(m = n + 1, ps = vector(m, i, prime(i)), s); forprime(p = ps[m] + 1, , s = vecsum(ps); if(!(s % m) && issquare(s/m), return(ps[1])); ps = concat(vecextract(ps, "^1"), p)); } \\ Amiram Eldar, Oct 18 2023
Search completed in 0.006 seconds
|