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.

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

This page as a plain text file.
%I A350400 #10 Dec 30 2021 17:28:04
%S A350400 1,3,7,11,21,24,30,60,42,45,63,75,90,135,147,198,165,105,252,264,180,
%T A350400 399,513,375,270,210,330,405,654,255,315,345,465,480,570,555,390,1020,
%U A350400 675,798,777,1110,900,660,585,525,855,825,960,630,924,735,1419,1305,840,975,780,1350,945,1050,1500
%N A350400 a(n) is the least k with A350399(k) = n, or 0 if there is no such k.
%C A350400 Conjecture: a(n) > 0 for all n.
%H A350400 Robert Israel, <a href="/A350400/b350400.txt">Table of n, a(n) for n = 0..1000</a>
%e A350400 a(3) = 11 because A350399(11) = 3 and this is the first appearance of 3 in A350399.
%p A350400 f:= proc(k) local P,i;
%p A350400   P:= select(t -> isprime(t) and isprime(2*k-t) and isprime(-t^2 mod (2*k)), [2,seq(i,i=3..k,2)]);
%p A350400   nops(P);
%p A350400 end proc:
%p A350400 N:= 60: # for a(0) to a(N)
%p A350400 V:= Array(0..N): count := 0:
%p A350400 for k from 1 while count < N+1 do
%p A350400   v:= f(k);
%p A350400   if v <= N and V[v] = 0 then
%p A350400     count:= count+1;
%p A350400     V[v]:= k;
%p A350400   fi;
%p A350400 od:
%p A350400 convert(V,list);
%t A350400 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 *)
%Y A350400 Cf. A350399.
%K A350400 nonn
%O A350400 0,2
%A A350400 _J. M. Bergot_ and _Robert Israel_, Dec 28 2021