The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)". 0
7, 7, 7, 7, 421, 2311, 43321, 59730109, 537052693 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
Is this sequence finite?
Up to n=13, the first two terms of the intersection of sequences "5", ..., "prime(n)" are 2 and 5 respectively.
LINKS
MATHEMATICA
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 *)
PROG
(PARI) s(p, k) = my(s=sumdigits(p^k)); s >> valuation(s, 2);
f(p, vp) = my(k=1); while(s(p, k) % vp, k++); k;
isok(p, vp) = s(p, f(p, vp)) == vp;
isokp(p, nbseq) = {for (k=1, nbseq, if (! isok(p, prime(k+2)), return (0)); ); return (1); }
a(n) = {my(nbpok = 0); forprime(p=2, oo, if (isokp(p, n), nbpok ++); if (nbpok == 3, return (p)); ); } \\ Michel Marcus, Dec 09 2018
CROSSREFS
Sequence in context: A084503 A168292 A024733 * A360807 A011472 A246506
KEYWORD
nonn,base,more
AUTHOR
Vladimir Shevelev, Dec 21 2014
EXTENSIONS
More terms from Peter J. C. Moses, Dec 21 2014
a(10)-a(11) from Michel Marcus, Dec 09 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)