|
|
A247122
|
|
Primes p such that the digit sum of p is an odd composite number.
|
|
1
|
|
|
997, 1699, 1789, 1879, 1987, 2689, 2797, 2887, 3499, 3697, 3769, 3877, 3967, 4597, 4759, 4957, 4993, 5479, 5569, 5659, 5749, 5839, 5857, 6199, 6379, 6397, 6469, 6577, 6793, 6829, 6883, 6991, 7297, 7369, 7459, 7477, 7549, 7639, 7873, 7927, 7963, 8089, 8179, 8269, 8287, 8377, 8467, 8539, 8629, 8647, 8719, 8737, 8863, 8971, 8999
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Motivation from James Grime: "What is the smallest prime with digital sum odd, but not prime?"
This sequences differs from A106763 at a(55) = 8999.
The digit sums are multiples of primes > 3. If the digit sum is a multiple of 3, the number itself cannot be prime.
The first odd composite digit sums are 25 (first occurrence is for 997), 35 (first occurrence is for 8999), 49 (first occurrence is for 598999), 55 (first occurrence is for 2998999), 65 (first occurrence is for 29999999), 77 (first occurrence is for 699899999) ...
|
|
LINKS
|
|
|
EXAMPLE
|
997 is prime but its digit sum is 25, which is odd and composite. So 997 is a member of this sequence.
|
|
MATHEMATICA
|
a247122[n_Integer] := Flatten@Last@Reap[Module[{i, digitSum}, digitSum[x_] := Plus @@ IntegerDigits[x]; For[i = 1, i < n,
If[OddQ[digitSum[Prime[i]]] && CompositeQ[digitSum[Prime[i]]],
dsocQ[n_]:=Module[{s=Total[IntegerDigits[n]]}, OddQ[s]&&CompositeQ[s]]; Select[Prime[Range[1200]], dsocQ] (* Harvey P. Dale, Feb 21 2016 *)
|
|
PROG
|
(PARI) forprime(p=1, 10^4, if(!isprime(sumdigits(p))&&sumdigits(p)%2, print1(p, ", ")))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|