cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A104887 Triangle T(n,k) = (n-k+1)-th prime, read by rows.

This page as a plain text file.
%I A104887 #27 Feb 15 2022 12:54:12
%S A104887 2,3,2,5,3,2,7,5,3,2,11,7,5,3,2,13,11,7,5,3,2,17,13,11,7,5,3,2,19,17,
%T A104887 13,11,7,5,3,2,23,19,17,13,11,7,5,3,2,29,23,19,17,13,11,7,5,3,2,31,29,
%U A104887 23,19,17,13,11,7,5,3,2,37,31,29,23,19,17,13,11,7,5,3,2,41,37,31,29
%N A104887 Triangle T(n,k) = (n-k+1)-th prime, read by rows.
%C A104887 Repeatedly writing the prime sequence backwards.
%C A104887 Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. Sequence A104887 is the reverse reluctant sequence of sequence the prime numbers (A000040). - _Boris Putievskiy_, Dec 13 2012
%H A104887 Reinhard Zumkeller, <a href="/A104887/b104887.txt">Rows n = 1..125 of triangle, flattened</a>
%H A104887 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012.
%F A104887 T(n,k) = A000040(n-k+1); a(n) = A000040(A004736(n)).
%F A104887 a(n) = A000040(m), where m=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - _Boris Putievskiy_, Dec 13 2012
%e A104887 Triangle begins:
%e A104887    2;
%e A104887    3,  2;
%e A104887    5,  3,  2;
%e A104887    7,  5,  3,  2;
%e A104887   11,  7,  5,  3,  2;
%e A104887   13, 11,  7,  5,  3,  2;
%e A104887   17, 13, 11,  7,  5,  3,  2;
%p A104887 T:=(n,k)->ithprime(n-k+1): seq(seq(T(n,k),k=1..n),n=1..13); # _Muniru A Asiru_, Mar 16 2019
%t A104887 Module[{nn=15,prms},prms=Prime[Range[nn]];Table[Reverse[Take[prms,n]],{n,nn}]]//Flatten (* _Harvey P. Dale_, Aug 10 2021 *)
%o A104887 (Haskell)
%o A104887 import Data.List (inits)
%o A104887 a104887 n k = a104887_tabl !! (n-1) !! (k-1)
%o A104887 a104887_row n = a104887_tabl !! (n-1)
%o A104887 a104887_tabl = map reverse $ tail $ inits a000040_list
%o A104887 -- _Reinhard Zumkeller_, Oct 02 2014
%o A104887 (GAP) P:=Filtered([1..200],IsPrime);;
%o A104887 T:=Flat(List([1..13],n->List([1..n],k->P[n-k+1]))); # _Muniru A Asiru_, Mar 16 2019
%Y A104887 Reflected triangle of A037126.
%Y A104887 Cf. A098012 (partial products per row).
%K A104887 nonn,tabl
%O A104887 1,1
%A A104887 _Gary W. Adamson_, Mar 29 2005
%E A104887 Edited by _Ralf Stephan_, Apr 05 2009