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 41-50 of 101 results. Next

A063934 Numbers which are either prime or the average of consecutive odd primes.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 23, 26, 29, 30, 31, 34, 37, 39, 41, 42, 43, 45, 47, 50, 53, 56, 59, 60, 61, 64, 67, 69, 71, 72, 73, 76, 79, 81, 83, 86, 89, 93, 97, 99, 101, 102, 103, 105, 107, 108, 109, 111, 113, 120, 127, 129, 131, 134, 137, 138
Offset: 1

Views

Author

Henry Bottomley, Aug 21 2001

Keywords

Comments

Numbers n such that nextprime(n-1) + prevprime(n+1) = 2n. - Wesley Ivan Hurt, May 13 2017

Examples

			7 is prime, 9 is the average of 7 and 11, 11 is prime, 12 is the average of 11 and 13; so 7, 9, 11 and 13 are in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Function[p, Union@ Join[p, Rest@ Map[Mean, Partition[p, 2, 1]]]]@ Prime@ Range@ 34 (* Michael De Vlieger, May 13 2017 *)
  • PARI
    { for (n=1, 1000, if (n==1, a=2; p=3, if (n%2, a=(q + p=nextprime(q + 1))/2, a=q=p)); write("b063934.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 03 2009

Formula

For n >= 1: a(2n)=A000040(n+1); a(2n+1)=(A000040(n+1)+A000040(n+2))/2 =A024675(n).

A093343 Primes of form (prime(n)^2 + prime(n+1)^2)/2.

Original entry on oeis.org

17, 37, 229, 2029, 14449, 22501, 25609, 28909, 32401, 42061, 57601, 72901, 116989, 176401, 181501, 265261, 304729, 324901, 378229, 462409, 497041, 695581, 804709, 1089961, 1299721, 1416109, 1664101, 1742401, 1932181, 1971241, 2712709, 2873029, 3062509, 3186229
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 26 2004

Keywords

Comments

Except for the first term, all terms == 1 mod 6. - Zak Seidov, Dec 02 2009
Except 17, all terms == 1 mod 12. Primes of the form A028334(n+1)^2 + A024675(n)^2. - Thomas Ordowski, Jun 28 2013

Crossrefs

Cf. A103739.

Programs

  • Mathematica
    Select[Mean/@Partition[Prime[Range[500]]^2,2,1],PrimeQ] (* Harvey P. Dale, Jun 16 2021 *)

Formula

Conjecture: a(n) ~ A224888(n). - Thomas Ordowski, Jul 25 2013

Extensions

Corrected and extended by Rick L. Shepherd, Nov 24 2004

A126554 Arithmetic mean of two consecutive balanced primes (of order one).

Original entry on oeis.org

29, 105, 165, 192, 234, 260, 318, 468, 578, 600, 630, 693, 840, 962, 1040, 1113, 1155, 1205, 1295, 1439, 1629, 1750, 1830, 2097, 2352, 2547, 2790, 2933, 3135, 3310, 3475, 3685, 3873, 4211, 4433, 4527, 4627, 4674, 4842, 5050, 5110, 5208, 5345, 5390, 5478
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

Might be called interprimes of order two, since the arithmetic means of two consecutive odd primes (A024675) sometimes are called interprimes.
Balanced primes of order two (A082077) and doubly balanced primes (A051795) have different definitions.
For primes in this sequence (prime interprimes of order two) see A126555.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..6000],IsPrime);;P1:=List(Filtered(List([0..Length(P)-3],k->List([1..3],j->P[j+k])),i->Sum(i)/3=i[2]),m->m[2]);;
    a:=List([1..Length(P1)-1],n->(P1[n+1]+P1[n])/2); # Muniru A Asiru, Mar 31 2018
  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2], AppendTo[a, ((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2]], {n, 1, 1000}]; Do[AppendTo[b, (a[[k + 1]] + a[[k]])/2], {k, 1, Length[a] - 1}]; b
  • PARI
    {m=6000;a=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,print1((a+q)/2,","));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 05 2007
    

Formula

a(n) = (A006562(n+1)+A006562(n))/2.

Extensions

Edited by Klaus Brockhaus, Jan 05 2007

A058296 Average of consecutive primes.

Original entry on oeis.org

2, 4, 9, 15, 21, 30, 39, 45, 56, 64, 72, 81, 93, 102, 108, 120, 134, 144, 154, 165, 176, 186, 195, 205, 225, 231, 240, 254, 266, 274, 282, 300, 312, 324, 342, 351, 363, 376, 386, 399, 414, 426, 436, 446, 459, 465, 483, 495, 506, 522, 544, 560, 570, 582, 596
Offset: 1

Views

Author

Donald Mills (dmills(AT)math.siu.edu), Feb 16 2003

Keywords

Comments

2 together with average of odd primes taken two at a time without overlaps, i.e., 2 together with average of (3,5), (7,11), (13,17), etc. - Harvey P. Dale, Apr 09 2018

Crossrefs

A bisection of A024675.

Programs

  • Maple
    with(linalg): v := linalg[vector](100): v[1] := 2: for j from 2 to 100 do v[j] := (ithprime(2*j-2)+ithprime(2*j-1))/2: od: print(v);
  • Mathematica
    Join[{2},Mean/@Partition[Prime[Range[2,121]],2]] (* Harvey P. Dale, Apr 09 2018 *)
  • PARI
    { write("b058296.txt", 1, " ", 2); p2=2; for (n=2, 20000, p1=nextprime(p2+1); p2=nextprime(p1+1); a=(p1+p2)/2; write("b058296.txt", n, " ", a); ); } \\ Harry J. Smith, May 30 2009

Formula

a(1)=2, a(n) = (prime(2n-2) + prime(2n-1))/2 for n>1, where prime(i) is the i-th prime.

A078443 Numbers which are both interprime and semiprime.

Original entry on oeis.org

4, 6, 9, 15, 21, 26, 34, 39, 69, 86, 93, 111, 129, 134, 205, 217, 254, 274, 309, 334, 381, 386, 393, 446, 453, 473, 489, 501, 515, 566, 667, 687, 723, 771, 803, 879, 933, 939, 974, 1003, 1011, 1126, 1167, 1207, 1226, 1234, 1243, 1286, 1294, 1299, 1313, 1465
Offset: 1

Views

Author

Lior Manor, Dec 31 2002

Keywords

Comments

Ratio of the number of odd terms to the number of even terms increases with increasing n. - Zak Seidov, May 22 2015

Examples

			a[8]=39 because 39=(37+41)/2 and 39=3*13
		

Crossrefs

Intersection of A001358 and A024675. - Zak Seidov, May 22 2015

Programs

  • Mathematica
    Select[Mean/@Partition[Prime[Range[250]],2,1],PrimeOmega[#]==2&] (* Harvey P. Dale, Oct 08 2013 *)
  • PARI
    lista(nn) = {prevp = 2; forprime (p=3, nn, n = p + prevp; if (n % 2 == 0, if (bigomega(n/2) == 2, print1(n/2, ", "););); prevp = p;);} \\ Michel Marcus, Jun 09 2013

A126556 Arithmetic mean of two consecutive prime interprimes of second order: interprimes of third order.

Original entry on oeis.org

734, 2825, 5957, 10305, 13932, 15830, 18825, 25084, 30205, 32121, 34901, 40640, 47984, 70842, 102897, 120165, 125973, 130250, 138924, 145480, 148894, 154236, 161676, 167730, 174737, 180632, 183077, 191253, 210375, 224327, 232817, 246285
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

For primes in this sequence (prime interprimes of third order) see A126557.

Crossrefs

Cf. A006562 (balanced primes), A024675 (interprimes), A126554 (interprimes of second order), A126555 (prime interprimes of second order).

Programs

  • PARI
    {m=250000;a=0;g=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,b=(a+q)/2;if(isprime(b),if(g>0,print1(h=(g+b)/2,","));g=b));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 11 2007

Formula

a(n) = (A126555(n)+A126555(n+1))/2.

Extensions

Edited by Klaus Brockhaus, Jan 11 2007

A074927 a(n) such that p(n)*p(n+1)+a(n) is a minimal square.

Original entry on oeis.org

3, 1, 1, 4, 1, 4, 1, 4, 9, 1, 9, 4, 1, 4, 9, 9, 1, 9, 4, 1, 9, 4, 9, 16, 4, 1, 4, 1, 4, 49, 4, 9, 1, 25, 1, 9, 9, 4, 9, 9, 1, 25, 1, 4, 1, 36, 36, 4, 1, 4, 9, 1, 25, 9, 9, 9, 1, 9, 4, 1, 25, 49, 4, 1, 4, 49, 9, 25, 1, 4, 9, 16, 9, 9, 4, 9, 16, 4, 16, 25, 1, 25, 1, 9, 4, 9, 16, 4, 1, 4, 36, 16, 4
Offset: 1

Views

Author

Zak Seidov, Oct 02 2002

Keywords

Comments

When a(n)=1, p(n) and p(n+1) are twin primes.
a(n+1) = A072681(A024675(n)). - Reinhard Zumkeller, Mar 04 2009

Examples

			a(154) = 100 because p(154)*p(155) + 100 = 804609 = 897^2.
		

Programs

  • Mathematica
    Flatten[{3,Table[((Prime[n+1]-Prime[n])/2)^2,{n,2,100}]}] (* Vaclav Kotesovec, Mar 23 2014 *)
    Join[{3},((#[[2]]-#[[1]])/2)^2&/@Partition[Prime[Range[2,100]],2,1]] (* Harvey P. Dale, Dec 04 2016 *)

Formula

For n>1: a(n) = ((p(n+1)-p(n))/2)^2. - Reinhard Zumkeller, Oct 22 2002

A075541 Numbers k such that prime(k) + prime(k+1) + prime(k+2) is a multiple of 3.

Original entry on oeis.org

2, 15, 36, 39, 46, 54, 55, 73, 96, 99, 102, 107, 110, 118, 129, 160, 164, 167, 179, 184, 187, 194, 199, 202, 218, 231, 238, 239, 242, 271, 272, 273, 274, 290, 291, 292, 311, 326, 339, 356, 357, 358, 362, 387, 419, 426, 437, 438, 449, 452, 464, 465, 489, 508
Offset: 1

Views

Author

Zak Seidov, Sep 21 2002

Keywords

Comments

Not every three successive primes have an integer average. The integer averages are in A075540.
Not all of these 3-averages are prime: the prime 3-averages are in A006562 (balanced primes). There are surprisingly many prime 3-averages: among first 117 3-averages, there are 59 primes. Indices i(n) of first prime in sequence of three primes with integer average are in sequence A064113. Interprimes (s-averages with s=2) are all composite, see A024675.

Examples

			a(2) = 15 because (prime(15)+prime(16)+prime(17)) = (1/3)*(47 + 53 + 59) = 53 (integer average of three successive primes).
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    q:= 2: r:= 3:
    for i from 1 while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      if p+q+r mod 3 = 0 then
         R:= R,i; count:= count+1
      fi
    od:
    R; # Robert Israel, Nov 10 2024
  • Mathematica
    A075541= {}; Do[If[IntegerQ[s3 = (Prime[i] + Prime[i + 1] + Prime[i + 2])/3], A075541 = Append[A075541, i]], {i, 1000}]; (* 119 terms*)

A162800 a(n) = n-th grid point that is covered by the zig-zag function for prime numbers such that the grid point is a vertex in the graph of the function.

Original entry on oeis.org

0, 2, 4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279
Offset: 0

Views

Author

Omar E. Pol, Jul 16 2009

Keywords

Comments

Also {0, 2} together the numbers A024675.
See A162345 for the first differences.

Crossrefs

Programs

  • Mathematica
    Join[{0, 2}, Most[#] + Differences[#]/2] & [Prime[Range[2, 100]]] (* Paolo Xausa, Jun 17 2024 *)

Extensions

Edited by Omar E. Pol, Jul 18 2009

A072681 a(n) = (n - A007917(n)) * (A007918(n) - n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 7, 12, 15, 16, 15, 12, 7, 0, 3, 4, 3, 0, 1, 0
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 01 2002

Keywords

Comments

a(n)=0 iff n is prime.
Local maxima occur at interprimes: a(A024675(n)) = A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Expanding upon the maxima comment, repetitive subset triplets (like 3,4,3) of form (k,k+1,k) occur when the middle value is a square. - Bill McEachen, Apr 14 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := (n - NextPrime[n+1, -1])*(NextPrime[n] - n); Table[a[n], {n, 2, 103}] (* Jean-François Alcover, Jun 14 2013 *)

Formula

a(n) = A064722(n) * A007920(n).
a(n) = A064722(n) * (A072680(n) - A064722(n)).
Previous Showing 41-50 of 101 results. Next