login
A138152
Triangular sequence: a(n, m) = a(n - 1, m) + 10 and a(n,m) + 2*ceiling(log(1+k)), k <= n.
2
3, 7, 11, 13, 17, 19, 23, 29, 31, 31, 37, 41, 41, 43, 47, 53, 59, 61, 61, 67, 71, 71, 73, 79, 83, 83, 89, 97, 101, 103, 101, 103, 107, 109, 113, 113, 127, 131, 131, 137, 139, 149, 151, 151, 157, 163, 163, 167, 173, 173, 179, 181, 181, 191, 193, 197, 199
OFFSET
1,1
COMMENTS
Row sums: {10, 60, 83, 109, 131, 173, 199, 306, 172, 301, 533, 113, 258, 407, 300, 471, 503, 533, 181, 780, ...}.
The procedure is based on the modulo-10 prime ending set {1,3,7,9} and leaves out {2,5} at the start. To n=20 the precedure produces all the primes except {2,5}. It also classifies primes by the length of the longest vector in which they appear.
FORMULA
a(0, m) = {0,1,3,7,9};
a(n, m) = a(n-1, m) + 10;
a(n, m) = If( prime,{a(n,m),a(n,m)+2*ceiling(log(1+k)),k <= n).
EXAMPLE
Rows begin
3, 7;
11, 13, 17, 19;
23, 29, 31;
31, 37, 41;
41, 43, 47;
53, 59, 61;
61, 67, 71;
71, 73, 79, 83;
83, 89;
97, 101, 103;
101, 103, 107, 109, 113;
113;
127, 131;
131, 137, 139;
149, 151;
151, 157, 163;
163, 167, 173;
173, 179, 181;
181;
191, 193, 197, 199;
MATHEMATICA
a[0, 0] = 0; a[0, 1] = 1; a[0, 2] = 3; a[0, 3] = 7; a[0, 4] = 9; a[n_, m_] := a[n, m] = a[n - 1, m] + 10; a0 = Table[Union[Flatten[Table[If[PrimeQ[a[n, m]] && PrimeQ[a[n, m] + 2*k], {a[n, m], a[n, m] + 2*k}, {}], {m, 0, 4}, {k, 0, Ceiling[Log[1 +n]]}]]], {n, 0, 20}]; Flatten[a0]
CROSSREFS
Sequence in context: A377232 A158942 A310192 * A004139 A249373 A180346
KEYWORD
nonn,tabf,uned
AUTHOR
Roger L. Bagula, May 04 2008
STATUS
approved