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!)
A285227 Primes with integer arithmetic mean of digits = 7 in base 10. 6
7, 59, 1999, 3889, 4789, 4969, 4987, 5689, 5779, 5869, 6679, 6949, 6967, 7489, 7669, 7687, 7759, 7867, 7993, 8389, 8677, 8839, 8893, 8929, 9199, 9397, 9649, 9739, 9829, 9883, 9973, 18899, 19889, 19979, 19997, 28979, 29789, 29879, 35999, 36899, 37799, 37889 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Select[Prime@ Range@ PrimePi@ 40000, Mean@ IntegerDigits@ # == 7 &] (* 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 7]
(Python)
from itertools import count, islice
from collections import Counter
from sympy.utilities.iterables import partitions, multiset_permutations
from sympy import isprime
def A285227_gen(): # generator of terms
yield 7
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(7*l-i, m=l-1, k=9, size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements()))) if isprime(q))
A285227_list = list(islice(A285227_gen(), 30)) # Chai Wah Wu, Nov 29 2023
CROSSREFS
Primes from A061424. 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), this sequence (k = 7), A285228 (k = 8).
Sequence in context: A331709 A203174 A183260 * A358132 A063969 A366613
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 May 8 12:43 EDT 2024. Contains 372333 sequences. (Running on oeis4.)