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.

A344032 a(n) is the least prime that begins a sequence of at least n distinct primes under iteration of A061762.

This page as a plain text file.
%I A344032 #6 May 09 2021 15:34:03
%S A344032 2,11,23,53,12451,36779999
%N A344032 a(n) is the least prime that begins a sequence of at least n distinct primes under iteration of A061762.
%e A344032 12451 is prime and A061762(12451) = 1*2*4*5*1+1+2+4+5+1 = 53.
%e A344032 53 is prime and A061762(53) = 5*3+5+3 = 23.
%e A344032 23 is prime and A061762(23) = 2*3+2+3 = 11.
%e A344032 11 is prime and A061762(11) = 1*1+1+1 = 3.
%e A344032 3 is prime and A061762(3) = 3+3 = 6 is not prime.
%e A344032 Thus 12451 begins a sequence of 5 distinct primes under the iteration of A061762.  Since 12451 is the least such prime, a(5) = 12451.
%p A344032 f:= proc(n) local L;
%p A344032    L:= convert(n,base,10);
%p A344032    convert(L,`+`)+convert(L,`*`)
%p A344032 end proc:
%p A344032 g:= proc(n) local S,v;
%p A344032   S:= {n}:
%p A344032   v:= n;
%p A344032   do
%p A344032     v:= f(v);
%p A344032     if member(v,S) or not isprime(v) then return nops(S) fi;
%p A344032     S:= S union {v}
%p A344032   od
%p A344032 end proc:
%p A344032 R:= NULL: p:= 1: m:= 0:
%p A344032 while m < 5 do
%p A344032   p:= nextprime(p);
%p A344032   v:= g(p);
%p A344032   if v > m then R:= R, p$(v-m); m:= v fi
%p A344032 od:
%p A344032 R;
%Y A344032 Cf. A061762, A214629.
%K A344032 nonn,base,more
%O A344032 1,1
%A A344032 _J. M. Bergot_ and _Robert Israel_, May 07 2021