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.

A350400 a(n) is the least k with A350399(k) = n, or 0 if there is no such k.

Original entry on oeis.org

1, 3, 7, 11, 21, 24, 30, 60, 42, 45, 63, 75, 90, 135, 147, 198, 165, 105, 252, 264, 180, 399, 513, 375, 270, 210, 330, 405, 654, 255, 315, 345, 465, 480, 570, 555, 390, 1020, 675, 798, 777, 1110, 900, 660, 585, 525, 855, 825, 960, 630, 924, 735, 1419, 1305, 840, 975, 780, 1350, 945, 1050, 1500
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Dec 28 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n.

Examples

			a(3) = 11 because A350399(11) = 3 and this is the first appearance of 3 in A350399.
		

Crossrefs

Cf. A350399.

Programs

  • Maple
    f:= proc(k) local P,i;
      P:= select(t -> isprime(t) and isprime(2*k-t) and isprime(-t^2 mod (2*k)), [2,seq(i,i=3..k,2)]);
      nops(P);
    end proc:
    N:= 60: # for a(0) to a(N)
    V:= Array(0..N): count := 0:
    for k from 1 while count < N+1 do
      v:= f(k);
      if v <= N and V[v] = 0 then
        count:= count+1;
        V[v]:= k;
      fi;
    od:
    convert(V,list);
  • Mathematica
    a[n_] := Count[Select[Range[2, 2*n], PrimeQ], ?(# >= n && PrimeQ[2*n - #] && PrimeQ[Mod[#*(2*n - #), 2*n]] &)]; seq[len, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[n < nmax && c < len, i = a[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[60, 10^4] (* Amiram Eldar, Dec 30 2021 *)

A350398 Numbers k such that for all pairs of primes p,q with p+q = 2*k, p*q mod 2*k is prime.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21, 24, 30, 31, 34, 36, 42, 45, 49, 63
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 28 2021

Keywords

Comments

a(25) > 10^6 if it exists.
Numbers k such that A350399(k) = A002375(k).

Examples

			a(5) = 7 is a term because 2*7 = 14 = 3+11 = 7+7, with 3*11 == 5 (mod 14) and 7*7 == 7 (mod 14), and both 5 and 7 are prime.
5 is not a term because 2*5 = 10 = 3+7 = 5+5, but 3*7 == 1 (mod 10) and 1 is not prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(k) local p;
      p:= 1;
      while p <= k do
       p:= nextprime(p);
       if isprime(2*k-p) and not isprime(-p^2 mod 2*k) then return false fi
      od;
      true
    end proc:
    select(filter, [$1..1000]);
  • Mathematica
    q[k_] := AllTrue[Select[Range[2, 2*k], PrimeQ], ! PrimeQ[2*k - #] || PrimeQ[Mod[#*(2*k - #), 2*k]] &]; Select[Range[100], q] (* Amiram Eldar, Dec 28 2021 *)
Showing 1-2 of 2 results.