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.

A342953 a(n) is the least prime that starts a string of exactly n primes p_1, p_2, ... p_n where p_{i+1} = A258881(p_i), but A258881(p_n) is not prime.

This page as a plain text file.
%I A342953 #12 Mar 31 2021 20:23:44
%S A342953 2,13,11,19,499,8851471
%N A342953 a(n) is the least prime that starts a string of exactly n primes p_1, p_2, ... p_n where p_{i+1} = A258881(p_i), but A258881(p_n) is not prime.
%C A342953 No further terms below 10^9.
%e A342953 a(3) = 11 because 11, A258881(11) = 13, and A258881(13) = 23 are prime.
%p A342953 f:= proc(n) option remember; local t,x;
%p A342953   x:= n + add(t^2,t=convert(n,base,10));
%p A342953   if not isprime(x) then 1 else 1+procname(x) fi
%p A342953 end proc:
%p A342953 V:= Vector(6): count:= 0: p:= 1:
%p A342953 while count < 6 do
%p A342953   p:= nextprime(p); v:= f(p);
%p A342953   if v <= N and V[v] = 0 then V[v]:= p; count:= count+1 fi
%p A342953 od:
%p A342953 convert(V,list);
%Y A342953 Cf. A076162, A258881, A342958.
%K A342953 nonn,more,base
%O A342953 1,1
%A A342953 _J. M. Bergot_ and _Robert Israel_, Mar 31 2021