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 51-57 of 57 results.

A333353 Primes p whose order of primeness A078442(p) is prime.

Original entry on oeis.org

3, 5, 17, 31, 41, 59, 67, 83, 109, 157, 179, 191, 211, 241, 283, 331, 353, 367, 401, 431, 461, 509, 547, 563, 587, 599, 617, 709, 739, 773, 797, 859, 877, 919, 967, 991, 1031, 1087, 1153, 1171, 1201, 1217, 1297, 1409, 1433, 1447, 1471, 1499, 1523, 1597, 1621
Offset: 1

Views

Author

Alois P. Heinz, Mar 15 2020

Keywords

Examples

			31 is a term: 31 -> 11 -> 5 -> 3 -> 2 -> 1, five (a prime number of) steps "->" = pi = A000720.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(isprime(n), 1+b(numtheory[pi](n)), 0)
        end:
    a:= proc(n) option remember; local p;
          p:= `if`(n=1, 1, a(n-1));
          do p:= nextprime(p);
             if isprime(b(p)) then break fi
          od; p
        end:
    seq(a(n), n=1..55);
  • Mathematica
    b[n_] := b[n] = If[!PrimeQ[n], 0, 1+b[PrimePi[n]]];
    okQ[n_] := PrimeQ[n] && PrimeQ[b[n]];
    Select[Range[2000], okQ] (* Jean-François Alcover, May 30 2022 *)

Formula

{ p in primes : A078442(p) is prime }.
a(n) = prime(A333364(n)).

A333364 Indices of primes p whose order of primeness A078442(p) is prime.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
Offset: 1

Views

Author

Alois P. Heinz, Mar 16 2020

Keywords

Comments

All terms are prime.

Examples

			11 is a term: prime(11) = 31 -> 11 -> 5 -> 3 -> 2 -> 1, five (a prime number of) steps "->" = pi = A000720.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(isprime(n), 1+b(numtheory[pi](n)), 0)
        end:
    a:= proc(n) option remember; local p;
          p:= `if`(n=1, 1, a(n-1));
          do p:= nextprime(p);
             if isprime(b(p)+1) then break fi
          od; p
        end:
    seq(a(n), n=1..62);
  • Mathematica
    b[n_] := b[n] = If[PrimeQ[n], 1 + b[PrimePi[n]], 0];
    a[n_] := a[n] = Module[{p}, p = If[n == 1, 1, a[n - 1]];
       While[True, p = NextPrime[p]; If[PrimeQ[b[p] + 1], Break[]]]; p];
    Table[a[n], {n, 1, 62}] (* Jean-François Alcover, Sep 14 2022, after Alois P. Heinz *)

Formula

{ p in primes : A049076(p) is prime }.
a(n) = pi(A333353(n)), with pi = A000720.

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).

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).

A318554 a(n) is the smallest prime number having order of primeness = prime(n).

Original entry on oeis.org

3, 5, 31, 709, 9737333, 3657500101, 2586559730396077, 4123221751654370051, 28785866289100396890228041
Offset: 1

Views

Author

David James Sycamore, Aug 27 2018

Keywords

Comments

Let F(k) denote A049076(k). The list of primes p such that F(p) = n begins with q, the smallest prime to have prime index in each of n-1 successive primeth iterations, finally taking nonprime index 1 at the n-th iteration. All other members p such that F(p) = n are primes > q which also take a nonprime index at the n-th iteration. The reverse sequence of associated indices for q = prime(n) gives successive terms of the primeth recurrence 1,2,3,5,... until reaching A007097(prime(n)) = a(n).

Examples

			The sequence of primes with order of primeness F(p) = prime(1) = 2 begins 3,17,41,67,...
so a(1)=3. Likewise, F(p) = prime(2) = 3 begins 5,59,179,... so a(2)=5.
		

Crossrefs

Formula

a(n) = A007097(prime(n)); n >= 1.

A321132 a(n) is the number of iterations of the mapping of x -> pi(x) until n reaches the main line as defined by A007097.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 3, 3, 3, 3, 0, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Robert G. Wilson v, Oct 27 2018

Keywords

Comments

All primes are either on the main line or will join it before reaching 0, as in A060197 or 1, as in A071578.
First occurrence of k, k=0,1,2,...: 1, 4, 7, 17, 59, 277, 1787, 15299, 167449, 2269733, etc.
A measure of Primeness - see the Fernandez link.

Examples

			a(10) is 3 because the tenth prime is 29 -> 10 -> 4 -> 2 and 2 is A007097(1).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ NestWhileList[PrimePi, n, ! MemberQ[{1, 2, 3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041}, #] &] - 1; Array[f, 105]

Formula

a(n) = 0 iff n is a member of A007097.
Previous Showing 51-57 of 57 results.