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-2 of 2 results.

A358155 First of four consecutive primes p,q,r,s such that (2*p+q)/5, (q+r)/10 and (r+2*s)/5 are prime.

Original entry on oeis.org

11, 2696717, 3500381, 3989903, 4515113, 8164073, 12451013, 18793013, 23567267, 24057713, 30312409, 36391853, 44569853, 45657881, 53442343, 54721253, 54944761, 56652203, 63993803, 76763081, 90662303, 92889127, 94670143, 105790973, 106339481, 108988223, 117213871, 118802533, 130741007, 145543523
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 01 2022

Keywords

Comments

11 is the only term that is in A007530, because if p is in A007530 (so q = p+2, r = p+6 and s = p+8), one of p, q, r, s, 2*p+q, q+r and r+2*s is divisible by 7.

Examples

			a(3) = 3500381 is a term because 3500381, 3500383, 3500407, 3500429 are four consecutive primes with (2*3500381 + 3500383)/5 = 2100229, (3500383 + 3500407)/10 = 700079, and (3500407 + 2*3500429)/5 = 2100253 all prime.
		

Crossrefs

Programs

  • Maple
    Res:= NULL: count:= 0:
    q:= 2: r:= 3: s:= 5:
    while count < 40 do
      p:= q; q:= r; r:= s; s:= nextprime(s);
      t:= (2*p+q)/5; u:= (q+r)/10; v:= (r+2*s)/5;
      if (t::integer and u::integer and v::integer and isprime(t) and isprime(u) and isprime(v)) then
        count:= count+1; Res:= Res, p;
      fi
    od:
    Res;
  • Mathematica
    Select[Partition[Prime[Range[8.3*10^6]], 4, 1], PrimeQ[(2*#[[1]] + #[[2]])/5] && PrimeQ[(#[[2]] + #[[3]])/10] && PrimeQ[(#[[3]] + 2*#[[4]])/5] &][[;; , 1]] (* Amiram Eldar, Nov 01 2022 *)

A358198 a(n) is the first member p of A007530 such that, with q = p+2, r = p+6 and s = p+8, (2*p+q)/5 is a prime and (r+2*s)/5^n is a prime.

Original entry on oeis.org

11, 101, 243701, 6758951, 3257480201, 5493848951, 58634348951, 218007942701, 21840280598951, 213065296223951, 186522444661451, 383378987630201, 7794174397786451, 110420241292317701, 67327687581380201, 91455128987630201, 3987035878499348951, 80659241994222005201, 4289429982503255201
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 02 2022

Keywords

Examples

			a(3) = 243701 because p = 247301, q = p+2 = 247303, r = p+6 = 243707, s = p+8 = 243709, (2*p+q)/5 = 146221 and (r+2*s)/5^3 = 5849 are primes, and p is the least prime that works.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,p,m;
            m:= 5^n;
            t:= 3;
            do
              t:= nextprime(t);
              if t*m mod 3 <> 1 then next fi;
              p:= (t*m-22)/3;
              if isprime(p) and isprime(p+2) and isprime(p+6) and isprime(p+8) and isprime((3*p+2)/5) then return p fi;
            od;
    end proc;
    map(f, [$1..20]);
  • Mathematica
    a[n_] := a[n] = Module[{t = 3, p, m = 5^n}, While[True, t = NextPrime[t]; If[Mod[t*m, 3] != 1, Continue[]]; p = (t*m - 22)/3; If[AllTrue[{p, p+2, p+6, p+8, (3p+2)/5}, PrimeQ], Return[p]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 19}] (* Jean-François Alcover, Jan 31 2023, after Maple program *)
Showing 1-2 of 2 results.