login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114905 Triangle where a(1,1) = 0; a(n,m) = number of terms in row (n-1) which, when added to m, are primes. 4
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, 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, 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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..11476 (rows 1 <= n <= 150).

EXAMPLE

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.

Triangle starts

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 2

6 2 6 1 5 1 1 2 6

8 4 2 3 5 4 3 1 2 3

MAPLE

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, Mar 13 2007

MATHEMATICA

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

CROSSREFS

Cf. A114906, A114919, A114920.

Sequence in context: A296976 A182321 A285731 * A200651 A126597 A261867

Adjacent sequences:  A114902 A114903 A114904 * A114906 A114907 A114908

KEYWORD

nonn,tabl

AUTHOR

Leroy Quet, Jan 06 2006

EXTENSIONS

Corrected and extended by R. J. Mathar, Mar 13 2007

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 16 21:59 EST 2019. Contains 320200 sequences. (Running on oeis4.)