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!)
A252280 For a prime p, denote by s(p,k) the odd part of the digital sum of p^k. Let k_1 be the smallest k such that s(p,k) is divisible by 7. Sequence lists primes p for which s(p,k_1)=7. 9

%I #11 Dec 07 2018 12:25:29

%S 2,5,7,11,19,29,31,37,41,43,59,61,71,73,79,97,101,103,107,109,127,137,

%T 149,151,163,167,181,193,197,211,223,233,239,241,257,271,277,293,307,

%U 313,331,347,359,373,383,397,409,419,421,431,433,467,487,491,509,523

%N For a prime p, denote by s(p,k) the odd part of the digital sum of p^k. Let k_1 be the smallest k such that s(p,k) is divisible by 7. Sequence lists primes p for which s(p,k_1)=7.

%C For s(p,k_1)=5, see A251964.

%t s[p_, k_] := Module[{s = Total[IntegerDigits[p^k]]}, s/2^IntegerExponent[s, 2]]; f7[p_] := Module[{k = 1}, While[! Divisible[s[p, k], 7], k++]; k]; ok7Q[p_] := s[p, f7[p]] == 7; Select[Range[1000], PrimeQ[#] && ok7Q[#] &] (* _Amiram Eldar_, Dec 07 2018*)

%o (PARI) s(p,k) = my(s=sumdigits(p^k)); s >> valuation(s, 2);

%o f7(p) = my(k=1); while(s(p,k) % 7, k++); k;

%o isok7(p) = s(p, f7(p)) == 7;

%o lista7(nn) = forprime(p=2, nn, if (isok7(p), print1(p, ", "))); \\ _Michel Marcus_, Dec 07 2018

%Y Cf. A221858, A225039, A225093, A251964.

%K nonn,base

%O 1,1

%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Dec 16 2014

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 April 27 21:44 EDT 2024. Contains 372020 sequences. (Running on oeis4.)