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 91-100 of 101 results. Next

A372263 Least odd prime factor of the n-th sum of two consecutive primes, A001043(n) = prime(n) + prime(n+1), or 2 if there is no odd prime factor.

Original entry on oeis.org

5, 2, 3, 3, 3, 3, 3, 3, 13, 3, 17, 3, 3, 3, 5, 7, 3, 2, 3, 3, 19, 3, 43, 3, 3, 3, 3, 3, 3, 3, 3, 67, 3, 3, 3, 7, 5, 3, 5, 11, 3, 3, 3, 3, 3, 5, 7, 3, 3, 3, 59, 3, 3, 127, 5, 7, 3, 137, 3, 3, 3, 3, 3, 3, 3, 3, 167, 3, 3, 3, 89, 3, 5, 47, 3, 193, 3, 3, 3, 3, 3, 3, 3, 109, 3, 223
Offset: 1

Views

Author

M. F. Hasler, Apr 24 2024

Keywords

Comments

Since the sum of any two primes > 2 is even, we rather consider odd prime factors.
Can it be proved or disproved that there are primes that occur only finitely many times (or never) in this sequence? If so, which is the smallest such prime?
From Robert Israel, Dec 29 2024: (Start)
Dickson's conjecture implies that every odd prime occurs infinitely many times in the sequence.
a(n) = 2 if and only if n = A000720(2^k) where k is in A226178. (End)

Examples

			Sums of two consecutive primes are given as s(n) = A001043(n). The least odd prime factor (or 2 if there's no odd prime factor) of these terms is a(n):
n = 1, 2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,  15,  16,  17,  18, ...
s = 5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, 112, 120, 128, ...
a = 5, 2,  3,  3,  3,  3,  3,  3, 13,  3, 17,  3,  3,  3,   5,   7,   3,   2, ...
Also, a(21) = spf(152) = 19; a(23) = spf(172) = 43; a(32) = spf(268) = 67, ...
		

Crossrefs

Cf. A001043 (sums of two consecutive primes), A078701 (least odd prime divisor), A020639 (spf: least prime factor), A000265 (odd part of n), A000079 (powers of 2).
Cf. A024677 (spf of A024675(n) = A001043(n)/2).
Cf. A226178.

Programs

  • Maple
    f:= proc(n) subs(infinity=2,min(numtheory:-factorset(ithprime(n)+ithprime(n+1)) minus {2})) end proc:
    map(f, [$1..100]); # Robert Israel, Dec 29 2024
  • PARI
    apply( {a(n) = max(A078701(A001043(n)), 2)}, [1..99])
    /* a "self-contained" but less efficient definition:
    a(n) = factor(max((n=prime(n)+prime(n+1))>>valuation(n,2),2))[1,1] */

Formula

a(n) = max(A078701(A001043(n)), 2) = A020639(max(A000265(A001043(n)), 2)), where A000265(m) > 2 unless m is in A000079.

A376614 a(n) is the least n-gonal number that is an interprime, i.e. the average of two consecutive primes.

Original entry on oeis.org

6, 4, 12, 6, 18, 21, 9, 370, 30, 12, 405, 39, 15, 45, 231, 18, 2619, 2772, 21, 205, 596, 69, 72, 26, 154, 81, 574, 30, 441, 93, 315, 34, 102, 105, 108, 111, 39, 1377, 120, 42, 1485, 129, 45, 1990, 138, 465, 144, 50, 150, 4564, 515, 19684, 1120, 56, 334, 846, 861, 60, 180, 5474, 186, 64, 192, 195
Offset: 3

Views

Author

Robert Israel, Sep 29 2024

Keywords

Comments

a(n) is the first number of the form ((n-2)*k^2 - (n-4)*k)/2 for k >= 0 that is in A024675.
a(n) = n if n is in A024675.

Examples

			a(5) = 12 because 12 = A000326(3) is a pentagonal number and is the average of consecutive primes 11 and 13, and neither of the previous pentagonal numbers (1 and 5) are averages of consecutive primes.
		

Crossrefs

Programs

  • Maple
    f:= proc(s) local n,x;
       for n from 1 do
         x:= ((s-2)*n^2 - (s-4)*n)/2;
         if x >= 4 and not isprime(x) and prevprime(x) + nextprime(x) = 2*x then return x fi
       od
    end proc:
    map(f, [$3..100]);

A072388 a(0) = 1; for n > 0, a(n) = floor((prime(n+1) + prime(n) + a(n-1))/3).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 16, 19, 23, 27, 31, 36, 40, 43, 47, 53, 57, 61, 66, 70, 74, 78, 83, 89, 95, 99, 103, 106, 109, 116, 124, 130, 135, 141, 147, 151, 157, 162, 167, 173, 177, 183, 189, 193, 196, 202, 212, 220, 225, 229, 233, 237, 243, 250, 256, 262, 267, 271, 276
Offset: 0

Views

Author

Roger L. Bagula, Jul 20 2002

Keywords

Comments

A smoothing applied to the primes as a data set. The method is a hybrid of exponential smoothing and simple moving average (see Wikipedia link). - Peter Munn, Mar 26 2019

Examples

			a(1) = floor((3+2+1)/3) = 2;
a(2) = floor((5+3+2)/3) = 3.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(a = 1); print1(a, ", "); for (n=1, nn, a = (prime(n+1) + prime(n) + a)\3; print1(a, ", "););} \\ Michel Marcus, Mar 20 2019

Extensions

Edited by Dean Hickerson, Oct 29 2002

A076639 Numbers that are neither primes nor interprimes.

Original entry on oeis.org

1, 8, 10, 14, 16, 20, 22, 24, 25, 27, 28, 32, 33, 35, 36, 38, 40, 44, 46, 48, 49, 51, 52, 54, 55, 57, 58, 62, 63, 65, 66, 68, 70, 74, 75, 77, 78, 80, 82, 84, 85, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100, 104, 106, 110, 112, 114, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Roger L. Bagula, Oct 23 2002

Keywords

Comments

The complement of A063934. - Bill McEachen, Oct 30 2020

Crossrefs

A078835 Sum of the divisors of the average of consecutive odd primes.

Original entry on oeis.org

7, 12, 13, 28, 24, 39, 32, 42, 72, 54, 56, 96, 78, 93, 120, 168, 127, 96, 195, 140, 121, 132, 128, 156, 216, 192, 280, 152, 360, 176, 204, 288, 403, 372, 288, 378, 288, 324, 372, 546, 384, 508, 336, 468, 252, 256, 403, 560, 384, 420, 744, 504, 384, 588, 480
Offset: 1

Views

Author

Joseph L. Pe, Jan 11 2003

Keywords

Examples

			The first pair of consecutive odd primes is 3,5, with average = 4 and sigma(4) = 7. Hence a(1) = 7. The second pair of consecutive odd primes is 5,7, with average = 6 and sigma(6) = 12, so a(2) = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[1, (Prime[i] + Prime[i + 1])/2], {i, 2, 101}]
    DivisorSigma[1,Mean[#]]&/@Partition[Prime[Range[2,60]],2,1] (* Harvey P. Dale, Dec 07 2013 *)

Formula

a(n) = A000203(A024675(n)). - Omar E. Pol, Dec 08 2019

A126559 Least interprime of n-th order.

Original entry on oeis.org

4, 29, 734, 199532, 7972305, 731908877
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Examples

			A024675(1) = 4, A126554(1) = 29, A126556(1) = 734, A126558(1) = 199532.
		

Crossrefs

Cf. A006562 (balanced primes), A024675 (interprimes), A126554 (interprimes of second order), A126556 (interprimes of third order), A126558 (interprimes of fourth order).

Extensions

Edited by Klaus Brockhaus, Jan 11 2007
a(5)-a(6) from Amiram Eldar, Mar 28 2020

A268480 Integers k such that A002110(k) is the average of two consecutive primes.

Original entry on oeis.org

2, 3, 5, 8, 38, 40, 64, 73, 89, 236, 480, 486
Offset: 1

Views

Author

Altug Alkan, Mar 21 2016

Keywords

Comments

In other words, the primorial numbers that are considered are those of the form (p + q)/2 where p and q are consecutive primes. Note that the initial values of (p - q)/2 are 1, 1, 1, 23, 239, 191, 331, 373, 1021.
A088256 is a subsequence of these primorials, which in turn are a subsequence of A024675.
Numbers k such that A038711(k) = A060270(k). - Amiram Eldar, May 19 2024

Examples

			5 is a term because 2*3*5*7*11 = 2310 = (2309 + 2311)/2.
8 is a term because 2*3*5*7*11*13*17*19 = 9699690 = (9699667 + 9699713)/2.
		

Crossrefs

Programs

  • Maple
    P:= 2: count:= 0:
    for n from 2 to 500 do
      P:= P*ithprime(n);
      # first try d=1
      if isprime(P+1) then
        good:= isprime(P-1);
      elif isprime(P-1) then good:= false
      else
        for d from ithprime(n+1) by 2 do
          if igcd(d,P) > 1 then next fi;
          if isprime(P+d) then
            good:= isprime(P-d); break
          elif isprime(P-d) then
            good:= false; break
          fi
        od;
      fi;
      if good then
         count:= count+1;
         A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count);  # Robert Israel, Aug 29 2016
  • Mathematica
    prim[n_] := Times @@ Prime[Range[n]]; Select[Range[2, 100], Total[NextPrime[(p = prim[#]), {-1, 1}]] == 2*p &] (* Amiram Eldar, May 19 2024 *)
  • PARI
    a002110(n) = prod(k=1, n, prime(k));
    for(n=2, 1e3, if((nextprime(a002110(n)) - a002110(n)) == (a002110(n) - precprime(a002110(n))), print1(n, ", ")))

A354949 a(n) is the first interprime that is divisible by exactly n squares of primes.

Original entry on oeis.org

6, 4, 72, 3528, 108900, 12744900, 3852664200, 260620460100, 282251958288300
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Jun 13 2022

Keywords

Comments

a(n) is the first member k of A024675 such that A056170(k) = n.

Examples

			a(2) = 72: 72 is an interprime because 72 = (71+73)/2 with 71 and 73 consecutive primes; 72 is divisible by the two squares of primes 2^2 and 3^2; and no smaller interprime is divisible by two squares of primes.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= ifactors(n)[2];
      nops(select(t -> t[2]>=2, F))
    end proc:
    V:= Array(0..5,-1): count:= 0: q:= 3:
    while count < 6 do
      p:= q; q:= nextprime(q); x:= (p+q)/2;
      v:= f(x);
      if V[v] = -1 then V[v]:= x; count:= count+1 fi
    od:
    convert(V,list):

Extensions

a(6) from Amiram Eldar, Jun 13 2022

A360751 a(n) is the least perfect square average of two consecutive primes with 2*n gap between them, or -1 if no such number exists.

Original entry on oeis.org

4, 9, 64, -1, 144, 625, 324, 2601, -1, 154449, 260100, 1681, 898704, 27225, 114244, -1, 278784, 223729, 4410000, 25281, 12888100, 4730625, 1512900, 4774225, -1, 8208225, 6130576, 1121481, 12744900, 34586161, 2433600, 45360225, 9784384, 1271279025, 64064016, -1, 69956496
Offset: 1

Views

Author

Tamas Sandor Nagy, Feb 19 2023

Keywords

Comments

For n > 1, no prime gap that is twice a square can have a perfect square in its middle as the average of the two consecutive primes with that gap between them. It is because then the lesser of the candidate consecutive primes could be factored into a composite of two integers greater than 1, by the algebraic identity a^2 - b^2 = (a - b)*(a + b).

Examples

			a(3) = 64 is a term because 64 = 8^2, a perfect square, which is the least such number that is the average of two consecutive primes 61 and 67, with 2*3 = 6 being the prime gap between them.
		

Crossrefs

Programs

  • Mathematica
    seq[len_, pmax_] := Module[{s = Table[0, {len}], p = 3, c = 0, q, m, d}, Do[s[[i^2]] = -1; c++, {i, 2, Floor[Sqrt[len]]}]; While[c < len && p < pmax, q = NextPrime[p]; d = (q - p)/2; m = (p + q)/2; If[d <= len && s[[d]] == 0 && IntegerQ[Sqrt[m]], c++; s[[d]] = m]; p = q]; s]; seq[20, 10^7] (* Amiram Eldar, Feb 19 2023 *)
  • PARI
    a(n) = if ((n>1) && issquare(n), return(-1)); forprime(p=2, oo, my(q=nextprime(p+1), s); if ((q-p == 2*n) && issquare(s=(p+q)/2), return(s))); \\ Michel Marcus, Feb 20 2023

Extensions

More terms from Amiram Eldar, Feb 19 2023

A375095 Primes p such that the difference between the average of the next 2 primes after p and p sets a new record.

Original entry on oeis.org

2, 3, 5, 7, 19, 31, 47, 83, 109, 113, 199, 523, 887, 1129, 1327, 5591, 9551, 15683, 19609, 31397, 155921, 188029, 338033, 360653, 370261, 492113, 1349533, 1357201, 1671781, 2010733, 4652353, 15203977, 17051707, 20831323, 47326693, 90438133, 164710681, 189695659
Offset: 1

Views

Author

Hugo Pfoertner, Jul 30 2024

Keywords

Crossrefs

Previous Showing 91-100 of 101 results. Next