|
|
A235119
|
|
Prime numbers whose central digit equals the sum of the other digits.
|
|
2
|
|
|
10513, 10531, 10733, 10861, 11411, 11503, 11833, 12401, 12511, 12713, 12823, 12841, 13721, 13831, 14821, 20411, 20521, 21401, 21713, 21841, 22501, 22721, 25801, 30713, 30841, 31721, 32803, 33811, 40813, 42701, 43801, 50821, 60811, 1005013, 1007231, 1008043
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
10513 is in the sequence because the central digit 5 equals the sum of the other digits 1+0+1+3.
|
|
MAPLE
|
with(numtheory):for n from 2 to 4 do:m:=2*n-2:for k from 10^m to 10^(m+1)-1 do:x:=convert(k, base, 10):n1:=nops(x):s:=sum('x[j]', 'j'=1..n1):s1:=s-x[n]:if x[n]=s1 and type(k, prime)=true then printf(`%d, `, k):else fi:od:od:
|
|
MATHEMATICA
|
cdsodQ[n_]:=Module[{idn=IntegerDigits[n], len}, len=(Length[idn]+1)/2; OddQ[ IntegerLength[ n]]&&Total[Drop[idn, {len}]]==idn[[len]]]; Select[ Prime[ Range[ 80000]], cdsodQ] (* Harvey P. Dale, Nov 11 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|