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.

A377882 Numbers i for which A194627(i) is prime.

This page as a plain text file.
%I A377882 #11 Nov 12 2024 22:19:21
%S A377882 2,3,9,11,29,75,77,101,105,107,221,225,235,257,315,321,323,357,363,
%T A377882 389,411,417,431,453,455,461,501,509,515,519,557,635,645,655,689,795,
%U A377882 799,851,885,887,911,915,921,923,933,977,989,1029,1033,1037,1071,1073,1145,1167,1175,1187,1197,1201,1241
%N A377882 Numbers i for which A194627(i) is prime.
%H A377882 Robert Israel, <a href="/A377882/b377882.txt">Table of n, a(n) for n = 1..10000</a>
%F A377882 A194627(a(n)) = A377791(n).
%F A377882 A377791(n) = (n-1)^2 + (a(n)-n)^2 + 1.
%e A377882 a(3) = 9 because the third prime in A194627 is A194627(9) = 41.
%p A377882 v:= 1: p:= 0: q:= 0: np:= 0: R:= NULL:
%p A377882 for i from 1 while np < 100 do
%p A377882   if isprime(v) then p:= p+1; R:= R, i; np:= np+1 else q:= q+1 fi;
%p A377882   v:= p^2 + q^2 + 1;
%p A377882 od:
%p A377882 R;
%t A377882 s={};t= {1};(* t is A194627 *) Do[ps = Count[t, _?(PrimeQ[#] &)];AppendTo[t, ps^2 + (n - ps - 1)^2 + 1];If[PrimeQ[t[[-1]] ],AppendTo[s,n]], {n, 2,1241}]; s (* _James C. McMahon_, Nov 12 2024 *)
%Y A377882 Cf. A194627, A377791.
%K A377882 nonn
%O A377882 1,1
%A A377882 _Robert Israel_, Nov 10 2024