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.

A333244 Prime numbers with prime indices in A333243.

Original entry on oeis.org

11, 127, 277, 1063, 2221, 3001, 4397, 5381, 7193, 9319, 10631, 12763, 15299, 15823, 21179, 22093, 24859, 30133, 33967, 37217, 38833, 40819, 43651, 55351, 57943, 60647, 66851, 68639, 77431, 80071, 84347, 87803, 90023, 98519, 101701, 103069, 125113, 127643
Offset: 1

Views

Author

Michael P. May, Mar 12 2020

Keywords

Comments

This sequence can also be generated by the N-sieve.

Examples

			a(1) = prime(A333243(1)) = prime(5) = 11.
		

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 (h-> h>2 and h::even)(b(p)) then break fi
          od; p
        end:
    seq(a(n), n=1..42);  # Alois P. Heinz, Mar 15 2020
  • 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[#>2 && EvenQ[#]&[b[p]], Break[]]]; p];
    Array[a, 42] (* Jean-François Alcover, Nov 16 2020, after Alois P. Heinz *)
  • PARI
    b(n)={my(k=0); while(isprime(n), k++; n=primepi(n)); k};
    apply(x->prime(prime(prime(x))), select(n->b(n)%2, [1..500])) \\ Michel Marcus, Nov 18 2022

Formula

a(n) = prime(A333243(n)).