login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A377882
Numbers i for which A194627(i) is prime.
3
2, 3, 9, 11, 29, 75, 77, 101, 105, 107, 221, 225, 235, 257, 315, 321, 323, 357, 363, 389, 411, 417, 431, 453, 455, 461, 501, 509, 515, 519, 557, 635, 645, 655, 689, 795, 799, 851, 885, 887, 911, 915, 921, 923, 933, 977, 989, 1029, 1033, 1037, 1071, 1073, 1145, 1167, 1175, 1187, 1197, 1201, 1241
OFFSET
1,1
LINKS
FORMULA
A194627(a(n)) = A377791(n).
A377791(n) = (n-1)^2 + (a(n)-n)^2 + 1.
EXAMPLE
a(3) = 9 because the third prime in A194627 is A194627(9) = 41.
MAPLE
v:= 1: p:= 0: q:= 0: np:= 0: R:= NULL:
for i from 1 while np < 100 do
if isprime(v) then p:= p+1; R:= R, i; np:= np+1 else q:= q+1 fi;
v:= p^2 + q^2 + 1;
od:
R;
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A089645 A214259 A287680 * A242680 A275767 A088086
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 10 2024
STATUS
approved