login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114906 Triangle where a(1,1) = 1; a(n,m) = number of terms in row (n-1) which, when added to m, are primes. 4

%I #17 Sep 07 2017 09:13:39

%S 1,1,1,2,2,0,2,1,3,0,2,3,2,2,2,4,1,4,1,4,0,5,3,4,2,1,2,4,5,3,4,2,2,2,

%T 2,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,

%U 5,2,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 Triangle where a(1,1) = 1; a(n,m) = number of terms in row (n-1) which, when added to m, are primes.

%C Rows n >= 6 are identical to those in A114905. - _R. J. Mathar_, Mar 13 2007

%H Michael De Vlieger, <a href="/A114906/b114906.txt">Table of n, a(n) for n = 1..11476</a> (rows 1 <= n <= 150).

%e Row 4 of the triangle is [2,1,3,0]. Adding 1 to these gives [3,2,4,1], of which 2 terms are primes. Adding 2 to these gives [4,3,5,2], of which 3 terms are primes. Adding 3 to these gives [5,4,6,3], of which 2 terms are primes. Adding 4 to these gives [6,5,7,4], of which 2 terms are primes. And adding 5 to these gives [7,6,8,5], of which 2 terms are primes. So row 5 is [2,3,2,2,2].

%p A114906 := proc(rowmax) local a,n,m,t ; a := matrix(rowmax,rowmax) ; a[1,1] := 1 ; 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 := A114906(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_, Mar 13 2007

%t NestList[Function[w, Map[Function[k, Count[Map[k + # &, w], _?PrimeQ]], Range[Length@ w + 1]]], {1}, 13] // Flatten (* _Michael De Vlieger_, Sep 06 2017 *)

%Y Cf. A114905, A114919, A114920.

%K nonn,tabl

%O 1,4

%A _Leroy Quet_, Jan 06 2006

%E More terms from _R. J. Mathar_, Mar 13 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)