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.

Original entry on oeis.org

2, 11, 23, 53, 12451, 36779999
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 07 2021

Keywords

Examples

			12451 is prime and A061762(12451) = 1*2*4*5*1+1+2+4+5+1 = 53.
53 is prime and A061762(53) = 5*3+5+3 = 23.
23 is prime and A061762(23) = 2*3+2+3 = 11.
11 is prime and A061762(11) = 1*1+1+1 = 3.
3 is prime and A061762(3) = 3+3 = 6 is not prime.
Thus 12451 begins a sequence of 5 distinct primes under the iteration of A061762.  Since 12451 is the least such prime, a(5) = 12451.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
       L:= convert(n,base,10);
       convert(L,`+`)+convert(L,`*`)
    end proc:
    g:= proc(n) local S,v;
      S:= {n}:
      v:= n;
      do
        v:= f(v);
        if member(v,S) or not isprime(v) then return nops(S) fi;
        S:= S union {v}
      od
    end proc:
    R:= NULL: p:= 1: m:= 0:
    while m < 5 do
      p:= nextprime(p);
      v:= g(p);
      if v > m then R:= R, p$(v-m); m:= v fi
    od:
    R;