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-6 of 6 results.

A099129 Let T(n) be the n-th triangular number n*(n+1)/2; then a(n) = n-th iteration T(T(T(...(n)))).

Original entry on oeis.org

0, 1, 6, 231, 1186570, 347357071281165, 2076895351339769460477611370186681, 143892868802856286225154411591351342616163027795335641150249224655238508171
Offset: 0

Views

Author

Jonathan Vos Post, Nov 14 2004

Keywords

Comments

The next term, a(8), has 162 digits. - Harvey P. Dale, May 29 2013

Examples

			a(3) = 231 because we can write the 3-time iterated expression on T(3), the triangular number sequence n*(n+1)/2, namely: T(T(T(3))) = 231.
		

Crossrefs

Cf. A000217, A007501, A058009 (analog with primes), A097547.

Programs

  • Maple
    a:= n-> (t-> (t@@n)(n))(j-> j*(j+1)/2):
    seq(a(n), n=0..7);  # Alois P. Heinz, Sep 29 2023
  • Mathematica
    Table[Nest[(#(#+1))/2&,n,n],{n,8}] (* Harvey P. Dale, May 29 2013 *)
  • PARI
    a(n) = my(k = n); for (j=1, n, k = k*(k+1)/2;); k; \\ Michel Marcus, Jan 01 2017

Formula

a(n) = A000217^n(n).
The sequence grows like O(n^2^n*1/2^n). This can be derived from the growth O(n^2*1/2) of the triangle sum by iteration. - Hieronymus Fischer, Jan 21 2006

Extensions

Offset changed to 1 by Georg Fischer, Jun 20 2022
a(0)=0 prepended by Alois P. Heinz, Sep 29 2023

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

Original entry on oeis.org

4, 12, 25, 39, 60, 94, 133, 183, 236, 320, 415, 520, 640, 805, 1007, 1212, 1463, 1800, 2144, 2562, 3021, 3523, 4135, 4840, 5747, 6630, 7701, 9057, 10392, 11812, 13519, 15400, 17534, 19827, 22564, 25624, 29206, 32998, 37041, 41819, 46659, 53223, 59345, 66104, 73368, 81897, 91157, 100827, 112045
Offset: 1

Views

Author

Matthew Campbell, Dec 31 2016

Keywords

Examples

			a(3) is 25 because the third composite is 8, the eighth composite is 15, and for the 3rd iteration, the fifteenth composite is 25.
To get a(4): 4 -> 9 -> 16 -> 26 -> 39.
		

Crossrefs

Cf. A002808.
For primes, see A058009.

Programs

  • Mathematica
    c = Select[Range[10^6], CompositeQ]; Table[Nest[c[[#]] &, n, n], {n, 50}] (* Michael De Vlieger, Dec 31 2016 *)

Extensions

More terms from Michael De Vlieger, Dec 31 2016

A344946 x -> prime(x) iterated prime(n) times, evaluated at n.

Original entry on oeis.org

3, 11, 709, 167449, 88362852307, 156740126985437, 1172447586903041169661
Offset: 1

Views

Author

Paolo Xausa, Jun 03 2021

Keywords

Examples

			a(1) = prime(prime(1)) = 3.
a(2) = prime(prime(prime(2))) = 11.
a(3) = prime(prime(prime(prime(prime(3))))) = 709.
		

Crossrefs

Programs

  • Mathematica
    nterms=6;Table[Nest[Prime[#]&,n,Prime[n]],{n,nterms}]
  • PARI
    a(n) = my(p = n); for (k=1, prime(n), p=prime(p)); p; \\ Michel Marcus, Jun 03 2021
  • Python
    from sympy import prime
    def a(n):
      iter = pn = prime(n)
      for i in range(1, pn): iter = prime(iter)
      return iter
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Jun 03 2021
    

Formula

a(n) = prime^{prime(n)}(n), with prime^{0}(n) = n and prime^{k}(n) = prime(prime^{k-1}(n)) for 1 <= k <= prime(n).
a(n) = prime(prime(...(n))) {prime(n) times}.

Extensions

a(7) from Jinyuan Wang, Jul 12 2021

A354967 Square array A(n, k), n > 0, k >= 0, read by antidiagonals upwards; A(n, k) is the image of n after k iterates of the prime function (A000040).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 7, 11, 11, 11, 6, 11, 17, 31, 31, 31, 7, 13, 31, 59, 127, 127, 127, 8, 17, 41, 127, 277, 709, 709, 709, 9, 19, 59, 179, 709, 1787, 5381, 5381, 5381, 10, 23, 67, 277, 1063, 5381, 15299, 52711, 52711, 52711, 11, 29, 83, 331, 1787, 8527, 52711, 167449, 648391, 648391, 648391
Offset: 1

Views

Author

Rémy Sigrist, Jun 14 2022

Keywords

Comments

For any m > 0, m appears A049076(m) times in the array.

Examples

			Array A(n, k) begins:
  n\k|  0   1   2    3     4      5       6        7         8
  ---+--------------------------------------------------------
    1|  1   2   3    5    11     31     127      709      5381
    2|  2   3   5   11    31    127     709     5381     52711
    3|  3   5  11   31   127    709    5381    52711    648391
    4|  4   7  17   59   277   1787   15299   167449   2269733
    5|  5  11  31  127   709   5381   52711   648391   9737333
    6|  6  13  41  179  1063   8527   87803  1128889  17624813
    7|  7  17  59  277  1787  15299  167449  2269733  37139213
    8|  8  19  67  331  2221  19577  219613  3042161  50728129
		

Crossrefs

Programs

  • PARI
    A(n,k) = { my (v=n); for (i=1, k, v=prime(v)); return (v) }

Formula

A(n, 0) = n.
A(n, k+1) = A000040(A(n, k)).
A(n, n) = A058009(n).
A(n, A000040(n)) = A344946(n).
A(n, 1) = A000040(n).
A(n, 2) = A006450(n).
A(n, 3) = A038580(n).
A(1, k) = A007097(k).
A(4, k) = A057450(k+1).
A(6, k) = A057451(k+1).
A(8, k) = A057452(k+1).
A(9, k) = A057453(k+1).

A377173 Rectangular array, by antidiagonals: (row 1) = r(1) = A000040 (primes); (row n) = r(n) = prime(r(n-1)) for n>=1.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 11, 11, 11, 11, 17, 31, 31, 31, 13, 31, 59, 127, 127, 127, 17, 41, 127, 277, 709, 709, 709, 19, 59, 179, 709, 1787, 5381, 5381, 5381, 23, 67, 277, 1063, 5381, 15299, 52711, 52711, 52711
Offset: 1

Views

Author

Clark Kimberling, Oct 19 2024

Keywords

Examples

			corner:
   2     3      5       7      11       13       17
   3     5     11      17      31       41       59
   5    11     31      59     127      179      277
  11    31    127     277     709     1063     1787
  31   127    709    1787    5381     8527    15299
 127   709   5381   15299   52711    87803   167449
 709  5381  52711  167449  648391  1128889  2269733
		

Crossrefs

Cf. A000040 (row 1), A007097 (column 1), A006450 (row 2), A038580 (row 3), A058009 (principal diagonal), A049076, A114537, A377181.

Programs

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

Formula

A049076(n) = number of appearances of prime(n).

A359278 Antidiagonal sums of A354967.

Original entry on oeis.org

1, 4, 9, 19, 45, 127, 491, 2597, 18905, 180253, 2176101, 32236029, 571516361, 11885151437, 285237145381, 7794999370341, 239867327549943, 8232788441242931, 312611538663794793, 13040004273788572983
Offset: 1

Views

Author

Christoph B. Kassir, Feb 03 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, my(p=k); for(j=k+1, n, p=prime(p)); p) \\ Andrew Howroyd, Feb 04 2023
  • Python
    from sympy import prime
    def nprime(x, y):
        p = x
        for _ in range(y):
            p = prime(p)
        return p
    def a(n):
        return sum([nprime(k, n-k) for k in range(1, n+1)])
    

Formula

a(n) = Sum_{k=1..n} p(k, n-k+1), where p(n,0) = n and p(n,k) = prime(p(n, k-1)) for k >= 1.

Extensions

a(9)-a(15) from Andrew Howroyd, Feb 03 2023
a(16)-a(20) from Alois P. Heinz, Feb 03 2023
Showing 1-6 of 6 results.