

A269415


a(n) is the smallest positive integer not already in the sequence such that Sum_{i=1..n} digital_sum(a(i)) is prime.


3



2, 1, 4, 6, 13, 11, 19, 8, 15, 22, 24, 17, 28, 20, 33, 31, 42, 26, 37, 51, 59, 39, 46, 35, 55, 48, 57, 44, 66, 75, 40, 60, 53, 64, 84, 62, 73, 93, 68, 82, 77, 79, 101, 91, 71, 88, 86, 103, 80, 109, 95, 97, 99, 129, 107, 112, 116, 118, 138, 110, 189, 105, 127, 114, 123, 125, 136, 132, 134, 141, 145, 149, 147, 121, 150, 143, 156, 130, 158, 154, 152, 163
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

The sequence starts with a(1) = 2 and is always extended with the smallest integer not yet present that does not lead to a contradiction.


LINKS



EXAMPLE

The sequence starts with 2, 1, 4, 6, 13, 11, 19, 8, 15, 22... which produces the partial sums (of digits) 2, 3 (=2+1), 7 (=3+4), 13 (=7+6), 17 (=13+1+3), 19 (=17+1+1), 29 (=19+1+9)... Those successive partial sums of digits are all prime.


MATHEMATICA

A269415L[n_] := Module[{lis = {}, b = 0}, Do[Do[If[! MemberQ[lis, a] && PrimeQ[b + Total[IntegerDigits[a]]], lis = Append[lis, a]; b += Total[IntegerDigits[a]]; Break[]], {a, Infinity}], {max, n}]; lis]; A269415L[82] (* JungHwan Min, Nov 09 2016 *)


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



