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!)
A037126 Triangle T(n,k) = prime(k) for k = 1..n. 10

%I #45 Oct 02 2020 07:24:04

%S 2,2,3,2,3,5,2,3,5,7,2,3,5,7,11,2,3,5,7,11,13,2,3,5,7,11,13,17,2,3,5,

%T 7,11,13,17,19,2,3,5,7,11,13,17,19,23,2,3,5,7,11,13,17,19,23,29,2,3,5,

%U 7,11,13,17,19,23,29,31,2,3,5,7,11,13,17,19,23,29,31,37,2,3,5,7,11,13,17

%N Triangle T(n,k) = prime(k) for k = 1..n.

%C Or, triangle read by rows in which row n lists first n primes.

%C Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. Sequence A037126 is reluctant sequence of the prime numbers A000040. - _Boris Putievskiy_, Dec 12 2012

%H Reinhard Zumkeller, <a href="/A037126/b037126.txt">Rows n = 1..100 of triangle, flattened</a>

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [Of] Integer Sequences And Pairing Functions</a>, arXiv preprint arXiv:1212.2732 [math.CO], 2012.

%F As a linear array, the sequence is a(n) = A000040(m), where m = n-t(t+1)/2, t=floor((-1+sqrt(8*n-7))/2). - _Boris Putievskiy_, Dec 12 2012

%e Triangle begins:

%e ..... 2

%e .... 2,3

%e ... 2,3,5

%e .. 2,3,5,7

%e . 2,3,5,7,11

%e ...

%p T:=(n,k)->ithprime(k): seq(seq(T(n,k),k=1..n),n=1..13); # _Muniru A Asiru_, Mar 16 2019

%t Flatten[ Table[ Prime[ i], {n, 12}, {i, n}]] (* _Robert G. Wilson v_, Aug 18 2005 *)

%t Module[{nn=15,prs},prs=Prime[Range[nn]];Table[Take[prs,n],{n,nn}]]// Flatten (* _Harvey P. Dale_, May 02 2017 *)

%o (Haskell)

%o a037126 n k = a037126_tabl !! (n-1) !! (k-1)

%o a037126_row n = a037126_tabl !! (n-1)

%o a037126_tabl = map (`take` a000040_list) [1..]

%o -- _Reinhard Zumkeller_, Oct 01 2012

%o (GAP) P:=Filtered([1..200],IsPrime);;

%o T:=Flat(List([1..13],n->List([1..n],k->P[k]))); # _Muniru A Asiru_, Mar 16 2019

%Y Cf. A000040, A002260, A037126, A138139, A138140, A138143.

%Y Cf. A007504 (row sums).

%K nonn,tabl

%O 1,1

%A Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

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 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)