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
2, 5, 7, 11, 19, 29, 31, 37, 41, 43, 59, 61, 71, 73, 79, 97, 101, 103, 107, 109, 127, 137, 149, 151, 163, 167, 181, 193, 197, 211, 223, 233, 239, 241, 257, 271, 277, 293, 307, 313, 331, 347, 359, 373, 383, 397, 409, 419, 421, 431, 433, 467, 487, 491, 509, 523 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For s(p,k_1)=5, see A251964.
LINKS
MATHEMATICA
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*)
PROG
(PARI) s(p, k) = my(s=sumdigits(p^k)); s >> valuation(s, 2);
f7(p) = my(k=1); while(s(p, k) % 7, k++); k;
isok7(p) = s(p, f7(p)) == 7;
lista7(nn) = forprime(p=2, nn, if (isok7(p), print1(p, ", "))); \\ Michel Marcus, Dec 07 2018
CROSSREFS
Sequence in context: A051645 A116635 A340759 * A184774 A038884 A338345
KEYWORD
nonn,base
AUTHOR
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 March 28 13:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)