login
Search: a069482 -id:a069482
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = (Prime(n+1)^2 - Prime(n)^2) / 8.
+10
1
2, 3, 9, 6, 15, 9, 21, 39, 15, 51, 39, 21, 45, 75, 84, 30, 96, 69, 36, 114, 81, 129, 186, 99, 51, 105, 54, 111, 420, 129, 201, 69, 360, 75, 231, 240, 165, 255, 264, 90, 465, 96, 195, 99, 615, 651, 225, 114, 231, 354, 120, 615, 381, 390, 399, 135, 411, 279
OFFSET
2,1
LINKS
FORMULA
a(n) = A024675(n) * A028334(n) / 2.
a(n) = (A000040(n+1)^2 - A000040(n)^2) / 8.
a(n) = A069482(n) / 8.
MAPLE
seq((ithprime(n+1)^2 - ithprime(n)^2)/8, n=2..100); # Robert Israel, Jan 22 2016
MATHEMATICA
Rest[Array[(Prime[# + 1]^2 - Prime[#]^2) / 8 &, 60]] (* Vincenzo Librandi, Jan 23 2016 *)
(#[[2]]-#[[1]])/8&/@Partition[Prime[Range[2, 60]]^2, 2, 1] (* Harvey P. Dale, Aug 01 2022 *)
PROG
(PARI) a(n) = (prime(n+1)^2 - prime(n)^2)/8; \\ Michel Marcus, Jan 22 2016
(Magma) [(NthPrime(n+1)^2-NthPrime(n)^2) div 8: n in [2..60]]; // Vincenzo Librandi, Jan 23 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
a(n) = prime(n+1)^4 - prime(n)^4.
+10
1
65, 544, 1776, 12240, 13920, 54960, 46800, 149520, 427440, 216240, 950640, 951600, 593040, 1460880, 3010800, 4226880, 1728480, 6305280, 5260560, 2986560, 10551840, 8508240, 15283920, 25787040, 15531120, 8490480, 18528720, 10078560, 21889200, 97097280, 34355280, 57775440
OFFSET
1,1
EXAMPLE
a(1) = 3^4 - 2^4 = 65.
a(2) = 5^4 - 3^4 = 544.
CROSSREFS
KEYWORD
nonn
AUTHOR
Bhushan Bade, Sep 22 2016
STATUS
approved
Primes p for which the difference between p^2 and the square of the next prime is both 1 more and 1 less than a prime.
+10
1
7, 17, 23, 37, 47, 59, 83, 89, 107, 113, 127, 131, 149, 163, 173, 257, 353, 433, 439, 457, 467, 521, 563, 761, 773, 839, 881, 953, 1009, 1031, 1213, 1307, 1319, 1321, 1697, 1733, 1759, 1811, 1861, 1871, 1913, 1979, 2153, 2221, 2281, 2287, 2309, 2393, 2593, 2767, 2789
OFFSET
1,1
COMMENTS
I.e., primes p for which the difference between p^2 and the square of the next prime is the average of a twin prime pair.
LINKS
EXAMPLE
The primes 7 and 11 are consecutive and their squares are 49 and 121. The difference is 72, and both 71 and 73 are prime.
Likewise, the difference between the square of 563 and the next prime (569) is 6792, and 6791 and 6793 are twin primes.
MAPLE
N:= 10^4: # to get all terms <= N
p:= 1: q:= 2: A:= NULL:
while p < N do
p:= q; q:= nextprime(p);
d:= q^2-p^2;
if isprime(d+1) and isprime(d-1) then A:= A, p fi
od:
A; # Robert Israel, Mar 02 2018
MATHEMATICA
For[p = 1, p < 10000, p++,
a = Prime[p];
b = Prime[p + 1];
c = b^2 - a^2;
d = (c + 1);
e = (c - 1);
If[And[PrimeQ[d] == True, PrimeQ[e] == True], Print[a]];
]
(* Second program: *)
Select[Partition[Prime@ Range@ 300, 2, 1], AllTrue[{# + 1, # - 1}, PrimeQ] &[#2^2 - #1^2] & @@ # &][[All, 1]] (* Michael De Vlieger, Dec 03 2017 *)
PROG
(PARI) lista(nn) = { my(pp=2); forprime(p=3, nn, my(d=p^2-pp^2); if(isprime(d+1) && isprime(d-1), print1(pp, ", ")); pp=p); } \\ Iain Fox, Dec 03 2017
CROSSREFS
Cf. A014574 (average of twin prime pairs), A069482 (difference between squares of consecutive primes).
KEYWORD
nonn
AUTHOR
Geoffrey Marnell, Nov 25 2017
STATUS
approved
Smaller member p of a pair of consecutive primes (p,q) such that either q^2-p^2+1 or q^2-p^2-1 is also prime.
+10
0
3, 5, 7, 11, 17, 19, 23, 31, 37, 41, 43, 47, 53, 59, 61, 73, 79, 83, 89, 101, 103, 107, 109, 113, 127, 131, 139, 149, 151, 163, 167, 173, 179, 181, 191, 193, 199, 211, 223, 227, 229, 233, 241, 251, 257, 263, 281, 307, 311, 313, 331, 337, 353, 359, 367, 373, 379
OFFSET
1,1
EXAMPLE
3 and 5 are consecutive primes, 5^2-3^2 = 25-9 = 16. 17 is prime, hence 3 is in the sequence.
79 and 83 are consecutive primes, 83^2-79^2 = 6889-6241 = 648. 647 is prime, hence 79 is in the sequence.
89 and 97 are consecutive primes, 97^2-89^2 = 9409-7921 = 1488. 1487 (as well as 1489) is prime, hence 89 is in the sequence.
MAPLE
isA128926 := proc(n) local p, q ; p := ithprime(n) ; q := ithprime(n+1) ; isprime((p+q)*(q-p)+1) or isprime((p+q)*(q-p)-1) ; end:
for n from 1 to 100 do if isA128926(n) then printf("%d, ", ithprime(n)) ; fi ; od ; # R. J. Mathar, Apr 26 2007
MATHEMATICA
Prime@ Select[ Range@ 75, PrimeQ[ Prime[ # + 1]^2 - Prime@#^2 - 1] || PrimeQ[ Prime[ # + 1]^2 - Prime@#^2 + 1] &] (* Robert G. Wilson v *)
PROG
(Magma) [ p: p in PrimesUpTo(380) | IsPrime(q^2-p^2-1) or IsPrime(q^2-p^2+1) where q is NextPrime(p) ]; /* Klaus Brockhaus, May 05 2007 */
CROSSREFS
Cf. A069482.
KEYWORD
nonn
AUTHOR
J. M. Bergot, Apr 25 2007
EXTENSIONS
Corrected and extended by Robert G. Wilson v, R. J. Mathar and Klaus Brockhaus, Apr 26 2007
STATUS
approved
Primes in A014150.
+10
0
2, 1429, 32869, 3189059, 5157791, 62701339, 139181423, 296686879, 522304883, 5070516751, 6276844867, 7098350179, 8983996079, 9331926623, 21211375343, 31177858939, 34861039007, 38865340309, 39918757589, 62858815181
OFFSET
1,1
MATHEMATICA
s0=s1=s2=0; lst={}; Do[p=Prime[n]; s0+=p; s1+=s0; s2+=s1; If[PrimeQ[s2], AppendTo[lst, s2]], {n, 7!}]; lst
KEYWORD
nonn
AUTHOR
STATUS
approved
Sorted integers m = (prime(n+1)^2 - prime(n)^2)/24, where prime(n) is A000040(n), with duplicates removed.
+10
0
1, 2, 3, 5, 7, 10, 12, 13, 15, 17, 18, 23, 25, 27, 28, 30, 32, 33, 35, 37, 38, 40, 43, 45, 47, 52, 55, 58, 62, 65, 67, 70, 72, 75, 77, 80, 85, 87, 88, 93, 95, 100, 103, 105, 107, 110, 117, 118, 120, 127, 130, 133, 135, 137, 138, 140, 143, 147
OFFSET
1,2
COMMENTS
A069482 gives the values of (prime(n+1)^2 - prime(n)^2), in order, with duplicates.
For n>=3 (prime(n+1)^2 - prime(n)^2)/24 is an integer.
The list here is sorted with duplicates removed to examine the nature and scope coverage over the integers of these ratios.
a(n) values have increasing differences on average, and approximately fit a curve for the n-th distinct value, given by (1/3)*n*log(n) + (3/10)*n*log(log(n))^3 for the first 10,000 values.
The differences between adjacent a(n) values, examined over the first 100,000 values, indicates all integers are covered (i.e., for any integer k there is at least one n where k = a(n+1) - a(n)).
Prime factorization of a(n) indicates every prime will appear as a factor for at least one a(n) value.
MATHEMATICA
DeleteDuplicates[Sort[Table[(Prime[n + 1]^2 - Prime[n]^2)/24, {n, 3, 300}]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard R. Forberg, Feb 19 2015
STATUS
approved
a(n) = prime(n+2)^3 - prime(n+1)^2 + prime(n).
+10
0
118, 321, 1287, 2083, 4755, 6583, 11823, 23879, 28973, 49721, 67583, 77863, 102015, 146711, 202617, 223553, 297101, 353483, 384043, 487781, 565619, 698159, 904835, 1020981, 1082623, 1214535, 1283683, 1431123, 2035723, 2232075, 2554319, 2666981, 3288765
OFFSET
1,1
FORMULA
a(n) = prime(n+2)^3 - prime(n+1)^2 + prime(n).
EXAMPLE
a(1) = 5^3 - 3^2 + 2 = 118.
MATHEMATICA
Table[Prime[n + 2]^3 - Prime[n + 1]^2 + Prime[n], {n, 60}] (* Vincenzo Librandi, Aug 20 2015 *)
PROG
(Magma) [NthPrime(n+2)^3-NthPrime(n+1)^2+NthPrime(n): n in [1.. 35]]; // Vincenzo Librandi, Aug 20 2015
(PARI) vector(40, n, prime(n+2)^3-prime(n+1)^2+prime(n)) \\ Michel Marcus, Aug 20 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Aug 20 2015
EXTENSIONS
More terms from Vincenzo Librandi, Aug 20 2015
STATUS
approved
a(n) = prime(n+1)^2 - prime(n).
+10
0
7, 22, 44, 114, 158, 276, 344, 510, 818, 932, 1338, 1644, 1808, 2166, 2762, 3428, 3662, 4428, 4974, 5258, 6168, 6810, 7838, 9320, 10104, 10508, 11346, 11774, 12660, 16016, 17034, 18638, 19184, 22062, 22652, 24498, 26412, 27726, 29762
OFFSET
1,1
FORMULA
a(n) = A036689(n+1) + A001223(n). - Michel Marcus, Aug 21 2015 [Corrected by Georg Fischer, Dec 12 2022]
a(n) ~ n^2 log^2 n. - Charles R Greathouse IV, Aug 22 2015
EXAMPLE
a(2) = 5^2 - 3 = 22.
MATHEMATICA
Table[Prime[n + 1]^2 - Prime[n], {n, 60}] (* Vincenzo Librandi, Aug 20 2015 *)
PROG
(PARI) first(m)=vector(m, i, prime(i+1)^2 - prime(i)) \\ Anders Hellström, Aug 20 2015
(PARI) a(n, p=prime(n)); nextprime(p+1)^2-p \\ Charles R Greathouse IV, Aug 22 2015
(PARI) first(n)=my(v=primes(n+1)); vector(n, i, v[i+1]^2-v[i]) \\ Charles R Greathouse IV, Aug 22 2015
(Magma) [NthPrime(n+1)^2-NthPrime(n): n in [1.. 70]]; // Vincenzo Librandi, Aug 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Aug 20 2015
STATUS
approved

Search completed in 0.023 seconds