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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005145 n copies of n-th prime. 8
2, 3, 3, 5, 5, 5, 7, 7, 7, 7, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Seen as a triangle read by rows: T(n,k) = A000040(n), 1 <= k <= n; row sums = A033286; central terms = A031368. - Reinhard Zumkeller, Aug 05 2009

Seen as a square array read by antidiagonals, a subtable of the binary operation multiplication tables A297845, A306697 and A329329. - Peter Munn, Jan 15 2020

REFERENCES

Douglas Hofstadter, "Fluid Concepts and Creative Analogies: Computer Models of the Fundamental Mechanisms of Thought", Basic Books, 1995.

LINKS

Reinhard Zumkeller, Rows n = 1..125 of triangle, flattened

FORMULA

From Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006: (Start)

a(n) = prime(floor(1/2 + sqrt(2*n))).

a(n) = A000040(A002024(n)). (End)

From Peter Munn, Jan 15 2020: (Start)

When viewed as a square array A(n,k), the following hold for n >= 1, k >= 1:

A(n,k) = prime(n+k-1).

A(n,1) = A(1,n) = prime(n), where prime(n) = A000040(n).

A(n+1,k) = A(n,k+1) = A003961(A(n,k)).

A(n,k) = A297845(A(n,1), A(1,k)) = A306697(A(n,1), A(1,k)) = A329329(A(n,1), A(1,k)).

(End)

Sum_{n>=1} 1/a(n)^2 = A097906. - Amiram Eldar, Aug 16 2022

EXAMPLE

Triangle begins:

2;

3, 3;

5, 5, 5;

7, 7, 7, 7;

...

MATHEMATICA

Table[Prime[Floor[1/2 + Sqrt[2*n]]], {n, 1, 80}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006 *)

Flatten[Table[Table[Prime[n], {n}], {n, 12}]] (* Alonso del Arte, Jan 18 2012 *)

PROG

(Haskell)

a005145 n k = a005145_tabl !! (n-1) !! (k-1)

a005145_row n = a005145_tabl !! (n-1)

a005145_tabl = zipWith ($) (map replicate [1..]) a000040_list

a005145_list = concat a005145_tabl

-- Reinhard Zumkeller, Jul 12 2014, Mar 18 2011, Oct 17 2010

(PARI) a(n) = prime(round(sqrt(2*n))) \\ Charles R Greathouse IV, Oct 23 2015

(Magma) [NthPrime(Round(Sqrt(2*n))): n in [1..60]]; // Vincenzo Librandi, Jan 18 2020

(Python)

from sympy import primerange

a = []; [a.extend([pn]*n) for n, pn in enumerate(primerange(1, 32), 1)]

print(a) # Michael S. Branicky, Jul 13 2022

CROSSREFS

Sequences with similar definitions: A002024, A175944.

Cf. A000040 (range of values), A003961, A031368 (main diagonal), A033286 (row sums), A097906.

Subtable of A297845, A306697, A329329.

Sequence in context: A053046 A261179 A066658 * A280740 A156350 A076367

Adjacent sequences: A005142 A005143 A005144 * A005146 A005147 A005148

KEYWORD

nonn,nice,tabl

AUTHOR

Russ Cox

STATUS

approved

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 December 5 04:50 EST 2022. Contains 358578 sequences. (Running on oeis4.)