%I A114905
%S A114905 0,0,1,1,2,1,3,2,1,2,3,2,2,2,2,4,1,4,1,4,0,5,3,4,2,1,2,4,5,3,4,2,2,2,2,
%T A114905 2,6,2,6,1,5,1,1,2,6,8,4,2,3,5,4,3,1,2,3,5,5,5,4,3,2,2,4,5,4,3,5,6,5,2,
%U A114905 2,4,3,6,5,2,2,4,8,4,6,1,6,3,4,4,6,1,6,3,4,10,4,5,4,5,2,8,2,5,4,5,2,8,
2
%N A114905 Triangle where a(1,1) = 0; a(n,m) = number of terms in row (n-1) which,
when added to m, are primes.
%H A114905 Leroy Quet, <a href="http://www.prism-of-spirals.net/">Home Page</a>
(listed in lieu of email address)
%e A114905 The third row is [1,2,1]. Adding m=3 to these terms gives [4,5,4], of
which one number is prime. Therefore a[4,3]=1 in the next row, third
column.
%e A114905 Triangle starts
%e A114905 0
%e A114905 0 1
%e A114905 1 2 1
%e A114905 3 2 1 2
%e A114905 3 2 2 2 2
%e A114905 4 1 4 1 4 0
%e A114905 5 3 4 2 1 2 4
%e A114905 5 3 4 2 2 2 2 2
%e A114905 6 2 6 1 5 1 1 2 6
%e A114905 8 4 2 3 5 4 3 1 2 3
%p A114905 A114905 := proc(rowmax) local a,n,m,t ; a := matrix(rowmax,rowmax) ;
a[1,1] := 0 ; for n from 2 to rowmax do for m from 1 to n do a[n,
m] := 0 ; for t from 1 to n-1 do if isprime( m+a[n-1,t] ) then a[n,
m] := a[n,m]+1 ; fi ; od ; od ; od ; RETURN(a) ; end: rowmax := 15
: a := A114905(rowmax) : for n from 1 to rowmax do for m from 1 to
n do printf("%d, ",a[n,m]) ; od ; od ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl),
Mar 13 2007
%Y A114905 Cf. A114906, A114919, A114920.
%Y A114905 Sequence in context: A153359 A023510 A005678 this_sequence A126597 A076081
A107338
%Y A114905 Adjacent sequences: A114902 A114903 A114904 this_sequence A114906 A114907
A114908
%K A114905 nonn,tabl
%O A114905 1,5
%A A114905 Leroy Quet Jan 06 2006
%E A114905 Corrected and extended by R. J. Mathar (mathar(AT)strw.leidenuniv.nl),
Mar 13 2007
|