cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-28 of 28 results.

A267896 a(n) = (Prime(n+1)^2 - Prime(n)^2) / 8.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(NthPrime(n+1)^2-NthPrime(n)^2) div 8: n in [2..60]]; // Vincenzo Librandi, Jan 23 2016
  • 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 *)
  • PARI
    a(n) = (prime(n+1)^2 - prime(n)^2)/8; \\ Michel Marcus, Jan 22 2016
    

Formula

a(n) = A024675(n) * A028334(n) / 2.
a(n) = (A000040(n+1)^2 - A000040(n)^2) / 8.
a(n) = A069482(n) / 8.

A276963 a(n) = prime(n+1)^4 - prime(n)^4.

Original entry on oeis.org

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

Views

Author

Bhushan Bade, Sep 22 2016

Keywords

Examples

			a(1) = 3^4 - 2^4 = 65.
a(2) = 5^4 - 3^4 = 544.
		

Crossrefs

A295706 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.

Original entry on oeis.org

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

Views

Author

Geoffrey Marnell, Nov 25 2017

Keywords

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.

Examples

			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.
		

Crossrefs

Cf. A014574 (average of twin prime pairs), A069482 (difference between squares of consecutive primes).

Programs

  • 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 *)
  • 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

A128926 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.

Original entry on oeis.org

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

Views

Author

J. M. Bergot, Apr 25 2007

Keywords

Examples

			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.
		

Crossrefs

Cf. A069482.

Programs

  • 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 */
  • 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 *)

Extensions

Corrected and extended by Robert G. Wilson v, R. J. Mathar and Klaus Brockhaus, Apr 26 2007

A157494 Primes in A014150.

Original entry on oeis.org

2, 1429, 32869, 3189059, 5157791, 62701339, 139181423, 296686879, 522304883, 5070516751, 6276844867, 7098350179, 8983996079, 9331926623, 21211375343, 31177858939, 34861039007, 38865340309, 39918757589, 62858815181
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • 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
    Select[Nest[Accumulate[#]&,Prime[Range[700]],3],PrimeQ] (* Harvey P. Dale, Jul 11 2025 *)

A254860 Sorted integers m = (prime(n+1)^2 - prime(n)^2)/24, where prime(n) is A000040(n), with duplicates removed.

Original entry on oeis.org

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

Views

Author

Richard R. Forberg, Feb 19 2015

Keywords

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.

Crossrefs

Programs

  • Mathematica
    DeleteDuplicates[Sort[Table[(Prime[n + 1]^2 - Prime[n]^2)/24, {n, 3, 300}]]]
    Union[Differences[Prime[Range[3,300]]^2]/24] (* Harvey P. Dale, Jul 18 2025 *)

A261464 a(n) = prime(n+2)^3 - prime(n+1)^2 + prime(n).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Aug 20 2015

Keywords

Examples

			a(1) = 5^3 - 3^2 + 2 = 118.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n+2)^3-NthPrime(n+1)^2+NthPrime(n): n in [1.. 35]]; // Vincenzo Librandi, Aug 20 2015
    
  • Mathematica
    Table[Prime[n + 2]^3 - Prime[n + 1]^2 + Prime[n], {n, 60}] (* Vincenzo Librandi, Aug 20 2015 *)
  • PARI
    vector(40, n, prime(n+2)^3-prime(n+1)^2+prime(n)) \\ Michel Marcus, Aug 20 2015

Formula

a(n) = prime(n+2)^3 - prime(n+1)^2 + prime(n).

Extensions

More terms from Vincenzo Librandi, Aug 20 2015

A261465 a(n) = prime(n+1)^2 - prime(n).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Aug 20 2015

Keywords

Examples

			a(2) = 5^2 - 3 = 22.
		

Crossrefs

Programs

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
Previous Showing 21-28 of 28 results.