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.

A340741 Numbers k such that A340740(k) is prime.

This page as a plain text file.
%I A340741 #20 Feb 06 2021 22:09:56
%S A340741 7,8,9,11,12,13,15,18,19,28,31,32,34,36,44,46,47,51,52,62,64,67,69,70,
%T A340741 73,83,88,109,110,112,128,148,153,159,189,190,192,206,212,214,222,224,
%U A340741 226,244,245,261,267,269,280,282,283,287,300,305,312,315,319,323,366,370,378,381,388,394,404
%N A340741 Numbers k such that A340740(k) is prime.
%H A340741 Robert Israel, <a href="/A340741/b340741.txt">Table of n, a(n) for n = 1..5000</a>
%e A340741 a(3) = 9 is a term because A340740(9) = 2 is prime.
%p A340741 f:= proc(n) local k;
%p A340741   add(`if`(igcd(k,n)=1, n mod k, 0),k=1..floor(n/2))
%p A340741 end proc:
%p A340741 select(t -> isprime(f(t)), [$1..1000]);
%t A340741 A340741[n_] :=
%t A340741   Position[Table[
%t A340741      PrimeQ[Sum[
%t A340741        Mod[m, i]*Floor[1/GCD[i, m]], {i, Floor[(m - 1)/2]}]], {m, 1,
%t A340741       n}], True] // Flatten;
%t A340741 A340741[404] (* _Robert P. P. McKone_, Jan 19 2021 *)
%o A340741 (PARI) isok(n) = isprime(sum(k=1, n\2, if (gcd(k, n)==1, n%k))); \\ _Michel Marcus_, Jan 18 2021
%Y A340741 Cf. A340731, A340740, A340742.
%K A340741 nonn
%O A340741 1,1
%A A340741 _J. M. Bergot_ and _Robert Israel_, Jan 18 2021