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

A317964 Prime numbers in the lexicographically earliest sequence of positive integers whose prime indices are not already in the sequence (A304360).

Original entry on oeis.org

2, 5, 13, 17, 23, 31, 37, 43, 47, 61, 67, 73, 79, 89, 103, 107, 109, 113, 137, 149, 151, 163, 167, 179, 181, 193, 197, 223, 227, 233, 241, 251, 257, 263, 269, 271, 277, 281, 307, 317, 347, 349, 353, 359, 379, 383, 389, 397, 419, 421, 431, 433, 449, 457, 463, 467, 487, 499, 503, 509, 521, 523, 547
Offset: 1

Views

Author

N. J. A. Sloane, Aug 26 2018

Keywords

Comments

Also primes whose prime index is not in A304360, or is in A324696. A prime index of n is a number m such that prime(m) divides n. - Gus Wiseman, Mar 19 2019

Crossrefs

Programs

  • Maple
    count:= 0:
    P:= {}: A:= NULL:
    for n from 2 while count < 100 do
      pn:= numtheory:-factorset(n);
      if pn intersect P = {} then
        P:= P union {ithprime(n)};
        if isprime(n) then A:= A, n; count:= count+1 fi;
      fi
    od:
    A; # Robert Israel, Aug 26 2018
  • Mathematica
    aQ[n_]:=n==1||Or@@Cases[FactorInteger[n],{p_,_}:>!aQ[PrimePi[p]]];
    Prime[Select[Range[100],aQ]] (* Gus Wiseman, Mar 19 2019 *)

A071578 Number of iterations of Pi(n) needed to reach 1, where Pi(x) denotes the number of primes <= x.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 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, 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

Benoit Cloitre, May 31 2002

Keywords

Crossrefs

Cf. A000720.

Programs

  • Mathematica
    Table[Length[NestWhileList[PrimePi[#]&,n,#!=1&]]-1,{n,110}] (* Harvey P. Dale, Dec 24 2018 *)
  • PARI
    for(n=2,150,s=n; t=0; while(s!=1,t++; s=sum(i=2,s,isprime(i)); if(s==1,print1(t,","); ); ))

Formula

a(n) = a(Pi(n))+1.
a(n) = A060197(n) - 2. - Filip Zaludek, Dec 10 2016

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.
Showing 1-3 of 3 results.