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.

Showing 1-4 of 4 results.

A294731 Smallest average of a twin prime pair divisible by the n-th prime, i.e. A090530(n), divided by 6*prime(n).

Original entry on oeis.org

1, 1, 3, 4, 1, 2, 1, 2, 7, 9, 5, 4, 1, 20, 3, 43, 4, 3, 14, 22, 9, 8, 19, 7, 1, 1, 8, 4, 24, 5, 1, 2, 2, 13, 4, 6, 5, 9, 22, 3, 15, 6, 11, 3, 7, 5, 20, 5, 6, 7, 3, 3, 9, 14, 10, 2, 35, 2, 1, 10, 25, 17, 1, 35, 5, 4, 1, 18, 15, 12, 25, 1, 2, 5
Offset: 3

Views

Author

Hugo Pfoertner, Nov 09 2017

Keywords

Comments

The sequence starts at n=3, because A090530(1)=4 is not divisible by 6*2 and A090530(2)=6 is not divisible by 6*3.
The positions of ones in the sequence are given by A060212, i.e. a(A000720(A060212(n)))=1 for all n>=3.

Examples

			a(5)=3 because 198 is the smallest average of a twin prime pair {197,199} that is divisible by the 5th prime 11: 3 = 198 / (6*11).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], k = 1}, While[! PrimeQ[6*k*p - 1] || ! PrimeQ[6*k*p + 1], k++]; k]; Array[a, 100, 3] (* Amiram Eldar, Aug 25 2025 *)

Formula

a(n) = A090530(n) / ( 6 * prime(n) ) for n >= 3.
a(n) = A071407(n) / 6. - Amiram Eldar, Aug 25 2025

A071407 Least k such that k*prime(n) + 1 and k*prime(n) - 1 are twin primes.

Original entry on oeis.org

2, 2, 6, 6, 18, 24, 6, 12, 6, 12, 42, 54, 30, 24, 6, 120, 18, 258, 24, 18, 84, 132, 54, 48, 114, 42, 6, 6, 48, 24, 144, 30, 6, 12, 12, 78, 24, 36, 30, 54, 132, 18, 90, 36, 66, 18, 42, 30, 120, 30, 36, 42, 18, 18, 54, 84, 60, 12, 210, 12, 6, 60, 150, 102, 6, 210, 30, 24, 6
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Note that 6 divides a(n) for n > 2. - T. D. Noe, Jan 07 2013

Examples

			n=4: prime(4)=7, a(4)=6 because 6*prime(4)=42 and {41,43} are primes.
		

Crossrefs

Cf. A071558 (k at every integer).
Cf. A220141, A220142 (record values).

Programs

  • Haskell
    a071407 n = head [k | k <- [2,4..], let x = k * a000040 n,
                          a010051' (x - 1) == 1, a010051' (x + 1) == 1]
    -- Reinhard Zumkeller, Feb 14 2013
  • Mathematica
    Table[fl=1; Do[s=(Prime[j])*k; If[PrimeQ[s-1]&&PrimeQ[s+1]&&Equal[fl, 1], Print[{j, k}]; fl=0], {k, 1, 2*j^2}], {j, 0, 100}]

Formula

From Amiram Eldar, Aug 25 2025: (Start)
a(n) = A090530(n) / prime(n).
a(n) = 6 * A294731(n) for n >= 3. (End)

A090531 Least multiple of n! sandwiched between twin primes, or 0 if no such number exists.

Original entry on oeis.org

4, 4, 6, 72, 240, 12240, 35280, 241920, 1088640, 50803200, 1157587200, 14370048000, 298896998400, 2353813862400, 11769069312000, 502146957312000, 4268249137152000, 621030249455616000, 9488317831888896000
Offset: 1

Views

Author

Amarnath Murthy, Dec 07 2003

Keywords

Comments

Conjecture: No term is zero.
This conjecture is implied by Dickson's conjecture. - Robert Israel, Feb 13 2018

Crossrefs

Programs

  • Maple
    f := proc (n) local k, t; t := factorial(n); for k from t by t do if isprime(k-1) and isprime(k+1) then return k end if end do end proc;
    map(f, [`$`(1 .. 20)]); # Robert Israel, Feb 13 2018
  • Mathematica
    lmn[n_]:=Module[{k=n!,m=1},While[AnyTrue[k*m+{1,-1},CompositeQ],m++];k*m]; Join[{4,4},Array[lmn,20,3]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 27 2020 *)

Formula

a(n) = A071256(A000142(n)). - Robert Israel, Feb 13 2018

Extensions

More terms from Ryan Propper, Jun 16 2005

A387287 Primes in the order of their first appearance among the factors of the averages of twin prime pairs.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 11, 19, 47, 13, 29, 103, 107, 137, 43, 59, 41, 71, 31, 67, 139, 283, 149, 313, 37, 347, 373, 397, 443, 113, 467, 271, 181, 281, 577, 593, 199, 157, 653, 131, 101, 89, 241, 83, 251, 379, 773, 787, 167, 109, 907, 163, 73, 1033, 53, 223, 1117
Offset: 1

Views

Author

Tamas Sandor Nagy, Aug 25 2025

Keywords

Comments

Will every prime appear, so that this sequence is a permutation of the primes?
The answer is yes if A071256(n) exists for every n. - Robert Israel, Aug 25 2025

Examples

			a(1) = 2 because 2 appeared first as a prime factor of the average of a twin prime pair, namely of 4 = 2*2 = 2^2, the average of 3 and 5, the first twin prime pair.
a(2) = 3 because 3 appeared next as a prime factor of the average of a twin prime pair, here 6 = 2*3, of the twin primes 5 and 7.
a(3) = 5 because 5 appeared next as a prime factor of the average of a twin prime pair, this time of 30 = 2*3*5, between 29 and 30. The averages 12 and 18 are skipped as their factors, 2 and 3, already appeared.
a(5) = 17 following a(4) = 7, skipping the primes 11 and 13 in the order of appearances.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime, {seq(i,i=3..10^4,2)}):
    TPA:= map(`+`, P intersect map(`-`,P,2),1):
    TPA:= sort(convert(TPA,list)):
    R:= NULL: S:= {}:
    for t in TPA do
      V:= numtheory:-factorset(t) minus S;
      if nops(V) > 1 then printf("t = %d: %a\n",t,V) fi;
      R:= R, op(sort(convert(V,list)));
      S:= S union V;
    od:
    R; # Robert Israel, Aug 25 2025
  • Mathematica
    With[{m = Select[Prime[Range[1000]], PrimeQ[# + 2] &] + 1}, DeleteDuplicates[Flatten[FactorInteger[#][[;; , 1]] & /@ m]]] (* Amiram Eldar, Aug 25 2025 *)
Showing 1-4 of 4 results.