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.

A352171 a(n) is the start of a sequence of exactly n members of A023200 under the iteration p -> 3*p+4.

This page as a plain text file.
%I A352171 #6 Mar 13 2022 19:09:59
%S A352171 7,13,3,1547803
%N A352171 a(n) is the start of a sequence of exactly n members of A023200 under the iteration p -> 3*p+4.
%C A352171 Let s(1) = a(n) and s(k+1) = 3*s(k)+4.  Then s(1), ..., s(n) are in A023200 but s(n+1) is not in A023200, and a(n) is the least value of s(n) for which this is the case.
%e A352171 a(3) = 3 because with s(1) = 3 we have s(2) = 3*3+4 = 13, s(3) = 3*13+4 = 43, s(4) = 3*43+4 = 133; 3, 13, and 43 are in A023200 because 3, 7, 13, 17, 42, 47 are prime, but 133 is not in A023200 because 133 is composite.
%p A352171 f:= proc(p) option remember;
%p A352171   if isprime(p) and isprime(p+4) then 1 + procname(3*p+4) else 0 fi
%p A352171 end proc:
%p A352171 V:= Vector(5): V[1]:= 7: V[3]:= 3: count:= 2:
%p A352171 for p from 13 by 30 while count < 5 do
%p A352171 v:= f(p);
%p A352171 if v > 0 and V[v] = 0 then count:= count+1; V[v]:= p; fi
%p A352171 od:
%p A352171 convert(V,list);
%Y A352171 Cf. A023200.
%K A352171 nonn,more
%O A352171 1,1
%A A352171 _J. M. Bergot_ and _Robert Israel_, Mar 07 2022