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.

A252732 In view of their definitions, let us refer to A251964 as sequence "5", A252280 as sequence "7", and similarly define sequence "prime(n)"; a(n) is the third term of the intersection of sequences "5", ..., "prime(n)".

This page as a plain text file.
%I A252732 #29 Oct 16 2019 13:24:35
%S A252732 7,7,7,7,421,2311,43321,59730109,537052693
%N A252732 In view of their definitions, let us refer to A251964 as sequence "5", A252280 as sequence "7", and similarly define sequence "prime(n)"; a(n) is the third term of the intersection of sequences "5", ..., "prime(n)".
%C A252732 Is this sequence finite?
%C A252732 Up to n=13, the first two terms of the intersection of sequences "5", ..., "prime(n)" are 2 and 5 respectively.
%t A252732 s[p_, k_] := Module[{s = Total[IntegerDigits[p^k]]}, s/2^IntegerExponent[s, 2]]; f[p_,q_] := Module[{k = 1}, While[ ! Divisible[s[p, k], q], k++]; k]; okQ[p_,q_] := s[p, f[p,q]] == q; okpQ[p_,nbseq_] := Module[{ans=True}, Do[If[!okQ[p,Prime[k+2]], ans=False; Break[]],{k,1,nbseq}]; ans]; a[n_]:=Module[{c=0, p=2},While[c<3 , If[okpQ[p,n],c++];p=NextPrime[p]];NextPrime[p,-1]]; Array[a,6] (* _Amiram Eldar_, Dec 09 2018 *)
%o A252732 (PARI) s(p, k) = my(s=sumdigits(p^k)); s >> valuation(s, 2);
%o A252732 f(p, vp) = my(k=1); while(s(p,k) % vp, k++); k;
%o A252732 isok(p, vp) = s(p, f(p, vp)) == vp;
%o A252732 isokp(p, nbseq) = {for (k=1, nbseq, if (! isok(p, prime(k+2)), return (0));); return (1);}
%o A252732 a(n) = {my(nbpok = 0); forprime(p=2, oo, if (isokp(p, n), nbpok ++); if (nbpok == 3, return (p)););} \\ _Michel Marcus_, Dec 09 2018
%Y A252732 Cf. A251964, A252280, A252281, A252282, A252283, A252666, A252668, A252670.
%K A252732 nonn,base,more
%O A252732 3,1
%A A252732 _Vladimir Shevelev_, Dec 21 2014
%E A252732 More terms from _Peter J. C. Moses_, Dec 21 2014
%E A252732 a(10)-a(11) from _Michel Marcus_, Dec 09 2018