|
|
A054268
|
|
Sum of composite numbers between prime p and nextprime(p) is a repdigit.
|
|
10
|
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
No additional terms below 472882027.
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Repdigit
|
|
FORMULA
|
|
|
EXAMPLE
|
a(5) is ok since between 259259257 and nextprime 259259261 we get the sum 259259258 + 259259259 + 259259260 which yield repdigit 777777777.
|
|
MATHEMATICA
|
repQ[n_]:=Count[DigitCount[n], 0]==9; Select[Prime[Range[2, 14500000]], repQ[Total[Range[#+1, NextPrime[#]-1]]]&] (* Harvey P. Dale, Jan 29 2011 *)
|
|
PROG
|
(Python)
from sympy import prime
A054268 = [prime(n) for n in range(2, 10**5) if len(set(str(int((prime(n+1)-prime(n)-1)*(prime(n+1)+prime(n))/2)))) == 1]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|