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.

Showing 1-2 of 2 results.

A058009 a(n) is obtained by applying the map k -> prime(k) n times, starting at n.

Original entry on oeis.org

2, 5, 31, 277, 5381, 87803, 2269733, 50728129, 1559861749, 64988430769, 2428095424619, 119543903707171, 5519908106212193, 248761474969923757
Offset: 1

Views

Author

Robert G. Wilson v, Nov 13 2000

Keywords

Examples

			a(3) is 31 because the third prime is 5, the fifth prime is 11 and for the 3rd iteration, the eleventh prime is 31.
To get a(4): 4 -> 7 -> 17 -> 59 -> 277.
		

Crossrefs

For composites, see A280327. - Matthew Campbell, Jan 01 2017

Programs

  • Maple
    a:= n-> (ithprime@@n)(n):
    seq(a(n), n=1..8);  # Alois P. Heinz, Jun 21 2019
  • Mathematica
    Table[ Nest[ Prime, n, n ], {n, 1, 11} ]
  • PARI
    a(n) = my(k = n); for (j=1, n, k = prime(k);); k; \\ Michel Marcus, Jan 01 2017
    
  • Python
    from sympy import prime
    def A058009(n):
        k = n
        for _ in range(n):
            k = prime(k)
        return k # Chai Wah Wu, Apr 06 2021

Extensions

Edited by N. J. A. Sloane, Oct 30 2008 at the suggestion of R. J. Mathar
a(12)-a(13) from Donovan Johnson, Feb 17 2011
a(14) from Giovanni Resta, Sep 29 2019
a(13) corrected by Daniel Suteu, Jun 20 2021

A377181 Rectangular array, by antidiagonals: (row 1) = r(1) = A002808 (composite numbers); (row n) = r(n) = A002808(r(n-1)) for n>=1.

Original entry on oeis.org

4, 6, 9, 8, 12, 16, 9, 15, 21, 26, 10, 16, 25, 33, 39, 12, 18, 26, 38, 49, 56, 14, 21, 28, 39, 55, 69, 78, 15, 24, 33, 42, 56, 77, 94, 106, 16, 25, 36, 49, 60, 78, 105, 125, 141, 18, 26, 38, 52, 69, 84, 106, 140, 164, 184, 20, 28, 39, 55, 74, 94, 115, 141, 183, 212, 236
Offset: 1

Views

Author

Clark Kimberling, Oct 19 2024

Keywords

Examples

			 corner:
   4     6     8     9    10    12    14    15    16    18
   9    12    15    16    18    21    24    25    26    28
  16    21    25    26    28    33    36    38    39    42
  26    33    38    39    42    49    52    55    56    60
  39    49    55    56    60    69    74    77    78    84
  56    69    77    78    84    94   100   105   106   115
  78    94   105   106   115   125   133   140   141   152
		

Crossrefs

Cf. A002808 (row 1), A050545 (row 2), A280327 (row 3), A006508 (column 1), A022450 (column 2), A023451 (column 3), A059981, A236356, A280327 (principal diagonal), A377173, A114577 (dispersion of the composite numbers).

Programs

  • Mathematica
    c[n_] := c[n] = Select[Range[500], CompositeQ][[n]]
    r[0] = Table[c[n], {n, 1, 10}]
    r[n_] := r[n] = c[r[n - 1]]
    Grid[Table[r[n], {n, 0, 6}]]  (* array *)
    p[n_, k_] := r[n][[k]];
    Table[p[n - k + 1, k], {n, 0, 9}, {k, n + 1, 1, -1}] // Flatten  (* sequence *)

Formula

A059981(n) = number of appearances of A002808(n).
Showing 1-2 of 2 results.