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

A076240 Remainder when 2nd order prime pp(n) = A006450(n) is divided by n-th prime = A000040(n).

Original entry on oeis.org

1, 2, 1, 3, 9, 2, 8, 10, 14, 22, 3, 9, 15, 19, 23, 29, 41, 39, 63, 69, 2, 6, 16, 16, 24, 42, 48, 52, 54, 52, 74, 84, 88, 102, 114, 122, 134, 152, 156, 166, 168, 1, 7, 13, 19, 23, 31, 71, 71, 73, 73, 65, 77, 91, 79, 91, 109, 115, 125, 137, 149, 155, 185, 197, 203, 197, 235
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Examples

			a(4) = 3 since prime(prime(4)) (mod prime(4)) = prime(7) (mod 7) = 17 (mod 7) = 3. - _Michael De Vlieger_, Mar 25 2017
		

Crossrefs

Programs

  • Maple
    a:= n-> (p-> irem(ithprime(p), p))(ithprime(n)):
    seq(a(n), n=1..70);  # Alois P. Heinz, Oct 09 2015
  • Mathematica
    Table[Mod @@ Map[Nest[Prime, n, #] &, {2, 1}], {n, 65}] (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    a(n) = prime(prime(n)) % prime(n); \\ Michel Marcus, Mar 25 2017

Formula

a(n) = prime^2(n) mod prime(n) = A006450(n) mod A000040(n).

A076243 Remainder when 3rd-order prime ppp(n) = A038580(n) is divided by n.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 4, 3, 8, 9, 5, 7, 10, 5, 7, 3, 2, 11, 17, 1, 20, 21, 11, 19, 12, 17, 14, 17, 18, 19, 18, 23, 28, 27, 11, 19, 15, 7, 2, 21, 40, 25, 31, 1, 19, 15, 9, 31, 46, 47, 10, 15, 43, 23, 14, 9, 17, 19, 18, 41, 24, 27, 50, 3, 14, 29, 13, 3, 4, 39, 21, 1, 47, 19, 31, 13, 6, 17
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    MapIndexed[Mod[#1, First@ #2] &, Nest[Prime, Range@ 79, 3]] (* Michael De Vlieger, Jul 22 2017 *)

Formula

a(n) = ppp(n) mod n = A038580(n) mod n.

A076241 Remainder when 2nd order prime pp(n)=A006450(n) is divided by n.

Original entry on oeis.org

0, 1, 2, 1, 1, 5, 3, 3, 2, 9, 6, 1, 10, 9, 1, 1, 5, 13, 8, 13, 10, 5, 17, 5, 9, 1, 23, 27, 19, 17, 27, 3, 14, 15, 19, 13, 31, 17, 16, 31, 38, 37, 35, 27, 31, 21, 28, 17, 12, 47, 43, 43, 39, 31, 26, 45, 13, 1, 17, 23, 17, 53, 11, 15, 1, 53, 10, 25, 64, 41, 38, 41, 68, 33, 59, 63, 65
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(NthPrime(n)) mod(n): n in [1..100]]; // Vincenzo Librandi, Jul 10 2017
  • Mathematica
    Table[Mod[Prime[Prime[n]], n], {n, 100}] (* Vincenzo Librandi, Jul 10 2017 *)
  • PARI
    a(n) = prime(prime(n)) % n; \\ Michel Marcus, Jul 09 2017
    

Formula

a(n) = A006450(n) mod n.

A076242 Remainder when 3rd order prime A038580(n) is divided by n-th prime=A000040(n).

Original entry on oeis.org

1, 2, 1, 3, 6, 10, 5, 8, 17, 19, 27, 31, 38, 35, 28, 39, 17, 17, 10, 38, 68, 63, 13, 55, 48, 4, 74, 100, 37, 29, 47, 121, 115, 136, 105, 28, 128, 109, 159, 90, 114, 31, 151, 4, 86, 108, 81, 147, 149, 189, 185, 119, 231, 166, 88, 238, 197, 233, 64, 186, 258, 111, 128, 260
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[Prime[Prime[Prime[n]]],Prime[n]],{n,70}] (* Harvey P. Dale, Sep 28 2013 *)

Formula

a(n) = Mod[A038580(n), A000040(n)]

A088973 Number of twin prime pairs between consecutive prime-indexed primes of order 4. The bounds are included in the calculation.

Original entry on oeis.org

5, 20, 25, 76, 51, 93, 61, 100, 176, 122, 207, 156, 89, 152, 249, 280, 44, 412, 178, 90, 293, 270, 282, 374, 340, 157, 186, 121, 169, 913, 263, 235, 255, 597, 162, 406, 457, 263, 418, 339, 221, 645, 161, 300, 133, 855, 1235, 236, 162, 240, 256, 243, 786, 261, 514, 590, 156, 481, 374, 211
Offset: 1

Views

Author

Cino Hilliard, Oct 30 2003

Keywords

Comments

Conjecture: The interval [PIPS4(n), PIPS4(n+1)] always contains at least one twin prime pair. (This implies the Twin Prime Conjecture.)

Examples

			a(1) = 5, since there are five pairs of twin primes at least PIPS4(1) = 31 and at most PIPS4(2) = 127: (41,43), (59,61), (71,73), (101,103), and (107,109).
		

Crossrefs

Programs

  • PARI
    piptwins4(m,n) = { for(x=m,n, f=1; c=0; p1 = prime(prime(prime(prime(prime(x))))); p2 = prime(prime(prime(prime(prime(x+1))))); forprime(j=p1,p2-2, if(isprime(j+2),f=0; c++) ); print1(c","); ) }
    
  • Sage
    def PIP(n,i): # Returns the n-th prime-indexed prime of order i
        if i==0:
            return primes_first_n(n)[n-1]
        else:
            return PIP(PIP(n,i-1),0)
    def A088973(n):
        return len([i for i in range(PIP(n,4),PIP(n+1,4),2) if (is_prime(i) and is_prime(i+2))])
    A088973(60) # Danny Rorabaugh, Mar 30 2015

Formula

PIPS4(x) = A049203(x) = the x-th prime-indexed primes of order 4 = prime(prime(prime(prime(prime(x))))) where prime(x) = A000040(x) is the x-th prime. a(n) = number of twin prime pairs in [PIPS4(n), PIPS(n+1)].

Extensions

Edited to count twin pairs entirely within [PIPS4(n), PIPS4(n+1)], rather than pairs with the first prime in that interval. - Danny Rorabaugh, Apr 01 2015

A094722 Primes p whose order of primeness A078442(p) is at least 13.

Original entry on oeis.org

3657500101, 88362852307, 2428095424619, 12055296811267, 75063692618249, 156740126985437
Offset: 1

Views

Author

Robert G. Wilson v, May 22 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Nest[ Prime, Range[35], 13]

Formula

a(n) = prime(A093047(n)). - Andrew Howroyd, Nov 17 2024

Extensions

a(6) from Robert G. Wilson v, May 22 2004
Name clarified by Andrew Howroyd, Nov 17 2024

A162253 Smallest value of the n-fold nesting prime(prime(...(k)...)) with a prime digital sum.

Original entry on oeis.org

2, 3, 5, 11, 1787, 5381, 5381, 5381, 648391, 648391, 414507281407, 414507281407
Offset: 1

Views

Author

Cino Hilliard, Jun 29 2009

Keywords

Comments

n-deep nestings prime(prime(...(prime(k))...)) = prime^n(k) can be arranged in a table T(n,k),
2 3 5 7 11 13 : A000040, n=0
3 5 11 17 31 41 : A006450, n=1
5 11 31 59 127 179 : A038580, n=2
11 31 127 277 709 1063 : A049090
31 127 709 1787 5381 8527 : A049203
127 709 5381 15299 52711 87803 : A049202
a(n) is the leftmost value in the n-th row (the one with the smallest k) with a digit sum which is prime.
In order to generate the entries a(11) and a(12), prime2() was used which reads a large 880 gigabyte file of all primes < 10^12.

Examples

			1st nesting is prime(1) = 2 which has a prime digit sum: a(0). The second nesting is prime(prime(1)) = 3, which has a prime digits sum: a(1)=3. The 3rd and 4th nesting also succeed for k=1 while the fifth nesting prime(prime(prime(prime(prime(4))))) = 1787 is the first occurrence of sum of digits is prime. Here nesting for k = 1,2,3 does not sum to a prime number.
		

Programs

  • PARI
    for(j=1,12,print(j","sodip2(100,j)","));
    sodip2(n,m) = \\multiple nesting of prime(prime(prime..(n)
    {
    local(s=0,a,x,y,j,p);
    for(x=1,n,
    for(i=1,m,p=prime2(p));
    a=eval(Vec(Str(p)));
    y=sum(j=1,length(a),a[j]);
    if(isprime(y),return(p));
    )
    }

Formula

{min A000040^n(k): A000040^n(k) in A028834}. - R. J. Mathar, Jul 16 2009

Extensions

Definition rephrased by R. J. Mathar, Jul 16 2009
Previous Showing 11-17 of 17 results.