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.
%I A252280 #11 Dec 07 2018 12:25:29 %S A252280 2,5,7,11,19,29,31,37,41,43,59,61,71,73,79,97,101,103,107,109,127,137, %T A252280 149,151,163,167,181,193,197,211,223,233,239,241,257,271,277,293,307, %U A252280 313,331,347,359,373,383,397,409,419,421,431,433,467,487,491,509,523 %N 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. %C A252280 For s(p,k_1)=5, see A251964. %t A252280 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 A252280 (PARI) s(p,k) = my(s=sumdigits(p^k)); s >> valuation(s, 2); %o A252280 f7(p) = my(k=1); while(s(p,k) % 7, k++); k; %o A252280 isok7(p) = s(p, f7(p)) == 7; %o A252280 lista7(nn) = forprime(p=2, nn, if (isok7(p), print1(p, ", "))); \\ _Michel Marcus_, Dec 07 2018 %Y A252280 Cf. A221858, A225039, A225093, A251964. %K A252280 nonn,base %O A252280 1,1 %A A252280 _Vladimir Shevelev_ and _Peter J. C. Moses_, Dec 16 2014