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!)
A285228 Primes with integer arithmetic mean of digits = 8 in base 10. 6
79, 97, 6899, 8699, 8969, 9689, 9887, 49999, 68899, 69997, 77899, 78889, 78979, 79699, 79987, 85999, 88789, 88897, 88969, 89599, 89689, 89779, 89797, 89959, 89977, 94999, 95989, 96799, 96979, 96997, 97789, 97879, 97987, 98689, 98779, 98869, 98887, 99679, 99787 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Select[Prime@ Range@ PrimePi[10^5], Mean@ IntegerDigits@ # == 8 &] (* Michael De Vlieger, Apr 22 2017 *)
PROG
(Magma) [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 8]
(Python)
from itertools import count, islice
from collections import Counter
from sympy.utilities.iterables import partitions, multiset_permutations
def A285228_gen(): # generator of terms
for l in count(2):
for i in range(1, 10):
yield from sorted(q for q in (int(str(i)+''.join(map(str, j))) for s, p in partitions((l<<3)-i, m=l-1, k=9, size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements()))) if isprime(q))
A285228_list = list(islice(A285228_gen(), 30)) # Chai Wah Wu, Nov 28 2023
CROSSREFS
Primes from A061425. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), A285226 (k = 5), A285227 (k = 7), this sequence (k = 8).
Sequence in context: A044039 A065211 A106757 * A087537 A117840 A296012
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Apr 19 2017
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 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)