OFFSET
1,7
COMMENTS
Each row, r, has 6r-1 terms. The first row does not account for the prime 3 and its count of 1.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..320
Craig Mayhew, Sums of digits of primes
EXAMPLE
To begin the second row, only 11 has digit-sum 2, so the first term is 1; both 13 & 31 have digit-sum 4 so the second term is 2; both 23 & 41 have digit-sum 5, so the third term is 2; etc.
To begin the third row, only 101 -> 2, so its first term is 1, both 103 & 211 -> 4 so its second term is 2; 113, 131, 311 & 401 ->5, so its third term is 4; etc.
\k .2,..4,..5,...7,...8,...10,...11,....13,....14,....16,.....17,.....19,.....20,.....22,......23,......25,......26,...,
r\
.1: 1,..0,..1,...1,...0}
.2: 1,..2,..2,...2,...3,....3,....3,.....1,.....1,.....2,......1}
.3: 1,..2,..4,...7,...7,...12,...13,....16,....16,....13,.....18,.....12,.....11,......6,.......4,.......1,.......0}
.4: 0,..4,..8,..20,..19,...31,...52,....67,....77,....93,....101,....116,.....95,.....92,......91,......63,......51, ...,
.5: 0,..4,.12,..28,..45,...95,..143,...236,...272,...411,....479,....630,....664,....742,.....757,.....741,.....706, ...,
.6: 0,..2,.14,..58,..76,..204,..389,...660,...852,..1448,...1971,...2832,...3101,...4064,....4651,....5393,....5376, ...,
.7: 0,..5,.21,..95,.138,..420,..773,..1747,..2329,..4616,...6456,..10496,..12743,..18710,...22447,...29209,...32075, ...,
.8: 0,..4,.24,.154,.212,..787,.1705,..4214,..5721,.12546,..19040,..34639,..43707,..71879,...92223,..135728,..155461, ...,
.9: 0,..2,.26,.226,.372,.1457,.3312,..9159,.13320,.32077,..50752,.102027,.138554,.249053,..331920,..535444,..655423, ...,
10: 0,.11,.42,.278,.547,.2395,.6090,.19204,.27894,.75517,.128909,.284482,.391199,.772365,.1087932,.1919618,.2427462, ...,
etc.
MATHEMATICA
dir[n_] := Floor[(3 n + 2)/2]; inv[n_] := Floor[(2 n - 1)/3]; f[n_] := Block[{p = NextPrime[10^(n - 1)], t = Table[0, {inv[9 n]}]}, While[p < 10^n, t[[ inv[Plus @@ IntegerDigits@ p]]]++; p = NextPrime@ p]; t]; Array[f, 5] // Flatten
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Robert G. Wilson v, Dec 29 2010
STATUS
approved