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.

Previous Showing 11-12 of 12 results.

A098383 Define a function f on the positive integers by: if n is 1 or composite, stop; but if n = prime(k) then f(n) = k; a(n) = sum of terms in trajectory of n under repeated application of f.

Original entry on oeis.org

1, 3, 6, 4, 11, 6, 11, 8, 9, 10, 22, 12, 19, 14, 15, 16, 28, 18, 27, 20, 21, 22, 32, 24, 25, 26, 27, 28, 39, 30, 53, 32, 33, 34, 35, 36, 49, 38, 39, 40, 60, 42, 57, 44, 45, 46, 62, 48, 49, 50, 51, 52, 69, 54, 55, 56, 57, 58, 87, 60, 79, 62, 63, 64, 65, 66, 94, 68, 69, 70, 91, 72
Offset: 1

Views

Author

Andrew S. Plewe, Oct 26 2004

Keywords

Comments

Sum of the terms in the prime index chain for n (cf. A049076).

Examples

			a(2) = 3 because 2 is the first prime, therefore 2 + 1 = 3. a(3) = 6 because 3 is the second prime and two is the first prime, therefore 3 + 2 + 1 = 6. a(4) = 4 because 4 is composite. a(5) = 11 because five is the third prime, three is the second prime and two is the first prime, which gives us 5 + 3 + 2 + 1 = 11 and so on.
		

Crossrefs

Programs

  • Maple
    a:= n-> n + `if`(isprime(n), a(numtheory[pi](n)), 0):
    seq (a(n), n=1..80);  # Alois P. Heinz, Jul 16 2012
  • Mathematica
    Table[s=n; p=n; While[PrimeQ[p], p=PrimePi[p]; s=s+p]; s, {n, 1000}] (T. D. Noe)

Extensions

More terms from Ray Chandler, Nov 04 2004

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).
Previous Showing 11-12 of 12 results.