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.

A339543 Beginnings of record-length chains of primes under iteration of A339541.

This page as a plain text file.
%I A339543 #5 Dec 08 2020 15:21:58
%S A339543 1,2,1483,2239,3023417
%N A339543 Beginnings of record-length chains of primes under iteration of A339541.
%C A339543 A number n is in this sequence if the sequence defined by x(k+1) = A339541(k) with x(0)=n has more initial primes than the sequences for smaller n.
%C A339543 No more terms < 10^8.
%e A339543 Starting with 1483 we get A339541(1483) = 1511, A339541(1511) = 1531, A339541(1531) = 1541, A339541(1541) = 1552.  This makes 4 initial primes (1483, 1511, 1531, 1541 but not 1552), which is more than we get starting with any number < 1483, so 1483 is in the sequence.
%p A339543 sod:= (n.b) -> convert(convert(n,base,b),`+`):
%p A339543 f:= n -> n + sod(n, sod(n,10)):
%p A339543 g:= proc(n) option remember;
%p A339543 if isprime(n) then 1 + procname(f(n))
%p A339543 else 0
%p A339543 fi
%p A339543 end proc:
%p A339543 R:= 1: vmax:= 0: p:= 1:
%p A339543 while p < 10^7 do
%p A339543   p:= nextprime(p);
%p A339543   v:= g(p);
%p A339543   if v > vmax then
%p A339543    R:= R, p; vmax:= v;
%p A339543   fi
%p A339543 od:
%p A339543 R;
%Y A339543 Cf. A339541, A339542.
%K A339543 nonn,base,bref,more
%O A339543 1,2
%A A339543 _J. M. Bergot_ and _Robert Israel_, Dec 08 2020