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 21-30 of 41 results. Next

A122413 Indices of primes occurring in A031134.

Original entry on oeis.org

3, 4, 5, 10, 17, 25, 31, 48, 190, 218, 328, 369, 740, 1185, 1664, 2226, 2227, 3386, 3387, 4060, 5950, 14358, 30804, 31546, 33610, 104072, 118506, 325853, 597312, 1319946, 2324141, 4140010, 4258996, 5911615, 8040879, 17567978, 23163299, 25203781
Offset: 1

Views

Author

Jon E. Schoenfield, Sep 02 2006

Keywords

Examples

			a(4)=10 because the 4th term of A031134 is the 10th prime number.
		

Crossrefs

Formula

a(n) = pi(A031134(n)).

A173655 Triangle read by rows: T(n,k) = prime(n) mod prime(k), 0 < k <= n.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 1, 1, 2, 0, 1, 2, 1, 4, 0, 1, 1, 3, 6, 2, 0, 1, 2, 2, 3, 6, 4, 0, 1, 1, 4, 5, 8, 6, 2, 0, 1, 2, 3, 2, 1, 10, 6, 4, 0, 1, 2, 4, 1, 7, 3, 12, 10, 6, 0, 1, 1, 1, 3, 9, 5, 14, 12, 8, 2, 0, 1, 1, 2, 2, 4, 11, 3, 18, 14, 8, 6, 0, 1, 2, 1, 6, 8, 2, 7, 3, 18, 12, 10, 4, 0
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 24 2010

Keywords

Examples

			Triangle begins as:
  0;
  1, 0;
  1, 2, 0;
  1, 1, 2, 0;
  1, 2, 1, 4, 0;
  1, 1, 3, 6, 2,  0;
  1, 2, 2, 3, 6,  4,  0;
  1, 1, 4, 5, 8,  6,  2,  0;
  1, 2, 3, 2, 1, 10,  6,  4, 0;
  1, 2, 4, 1, 7,  3, 12, 10, 6, 0;
		

Crossrefs

Cf. A001223 (2nd diagonal), A033955 (row sums), A102647 (row products excluding 0's), A031131 (3rd diagonal after first 3 terms).

Programs

  • Magma
    A173655:= func< n,k | NthPrime(n) mod NthPrime(k) >;
    [A173655(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 10 2024
    
  • Maple
    A173655 := proc(n,k) ithprime(n) mod ithprime(k) ;end proc:
    seq(seq(A173655(n,k),k=1..n),n=1..20) ; # R. J. Mathar, Nov 24 2010
  • Mathematica
    Flatten[Table[Mod[Prime[n], Prime[Range[n]]], {n, 15}]]
  • PARI
    forprime(p=2,40,forprime(q=2,p,print1(p%q", "))) \\ Charles R Greathouse IV, Dec 21 2011
    
  • SageMath
    def A173655(n,k): return nth_prime(n)%nth_prime(k)
    flatten([[A173655(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Apr 10 2024

A075527 a(n) = A008578(n+3) - A008578(n+1).

Original entry on oeis.org

2, 3, 4, 6, 6, 6, 6, 6, 10, 8, 8, 10, 6, 6, 10, 12, 8, 8, 10, 6, 8, 10, 10, 14, 12, 6, 6, 6, 6, 18, 18, 10, 8, 12, 12, 8, 12, 10, 10, 12, 8, 12, 12, 6, 6, 14, 24, 16, 6, 6, 10, 8, 12, 16, 12, 12, 8, 8, 10, 6, 12, 24, 18, 6, 6, 18, 20, 16, 12, 6, 10, 14, 14, 12, 10, 10, 14, 12, 12, 18, 12
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2002

Keywords

Comments

For n>0: a(n) = A031131(n) and a(n) - a(n-1) = A075526(n).

Crossrefs

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010

A144103 Let N(p,i) denote the result of applying "nextprime" i times to p; a(n) = smallest prime p such that N(p,2) - p = 2*n, or -1 if no such prime exists.

Original entry on oeis.org

-1, 3, 5, 23, 19, 47, 83, 211, 109, 317, 619, 199, 1373, 1123, 1627, 4751, 2557, 3413, 4289, 1321, 2161, 2477, 7963, 5591, 9551, 17239, 15823, 14087, 19603, 34963, 36389, 33223, 24251, 35603, 43321, 19609, 134507, 31393, 136999, 31397, 38461, 107357
Offset: 1

Views

Author

T. D. Noe, Sep 11 2008

Keywords

Comments

p and p+2n are primes and there is one prime in the range p+1 to p+2n-1.
a(n) is the prime for which 2n+2 first occurs in A031131.

Crossrefs

Cf. A031131.
A000230 is an analogous sequence based on N(p,1). - N. J. A. Sloane, Nov 07 2020

Programs

  • Mathematica
    nn=51; t=Table[0,{nn}]; t[[1]]=-1; cnt=1; n=1; While[cntHarvey P. Dale, Jun 26 2017 *)

Extensions

Definition edited by N. J. A. Sloane, Nov 07 2020

A155067 First differences of A031368.

Original entry on oeis.org

3, 6, 6, 6, 8, 10, 6, 12, 8, 6, 10, 14, 6, 6, 18, 10, 12, 8, 10, 12, 12, 6, 14, 16, 6, 8, 16, 12, 8, 6, 24, 6, 18, 16, 6, 14, 12, 10, 12, 18, 12, 8, 10, 12, 6, 20, 12, 10, 14, 24, 16, 8, 16, 12, 8, 10, 14, 12, 10, 8, 16, 14, 18, 18, 12, 12, 10, 12, 24, 14, 12, 6, 24, 6, 18, 6, 24, 12, 18, 10
Offset: 1

Views

Author

Paul Curtz, Jan 19 2009

Keywords

Comments

All but the first term are even.

Crossrefs

Formula

a(n)= A031368(n+1)-A031368(n).
a(n)= A001223(2n-1)+A001223(2n). - R. J. Mathar, Feb 27 2009
a(n)= A031131(2n-1). - R. J. Mathar, Feb 27 2009

Extensions

Edited and extended by R. J. Mathar, Feb 27 2009

A180101 a(0)=0, a(1)=1; thereafter a(n) = largest prime factor of sum of all previous terms.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41
Offset: 0

Views

Author

N. J. A. Sloane, Jan 16 2011

Keywords

Comments

More precisely, a(n) = A006530 applied to sum of previous terms.
Inspired by A175723.
Except for initial terms, same as A076272, but the simple definition warrants an independent entry.

Crossrefs

Cf. A006530, A076272, A175723, A180107 (partial sums).

Formula

For the purposes of this paragraph, regard 0 as the (-1)st prime and 1 as the 0th prime. Conjectures: All primes appear; the primes appear in increasing order; the k-th prime p(k) appears p(k+1)-p(k-1) times (cf. A031131); and p(k) appears for the first time at position A164653(k) (sums of two consecutive primes). These assertions are stated as conjectures only because I have not written out a formal proof, but they are surely true.

A213926 prime(n^2) - prime(n).

Original entry on oeis.org

0, 4, 18, 46, 86, 138, 210, 292, 396, 512, 630, 790, 968, 1150, 1380, 1566, 1820, 2082, 2370, 2670, 3010, 3382, 3720, 4122, 4540, 4950, 5416, 5900, 6372, 6884, 7446, 8030, 8600, 9202, 9782, 10476, 11164, 11886, 12576, 13326, 14148, 14920, 15686, 16554, 17412
Offset: 1

Views

Author

Vincenzo Librandi, Mar 06 2013

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n^2)-NthPrime(n): n in [1..40]];
    
  • Maple
    A213926 := proc(n) ithprime(n^2)-ithprime(n) ; end proc: seq(A213926(n), n=1..40) ;
  • Mathematica
    Table[Prime[n^2] - Prime[n], {n, 40}]
  • PARI
    a(n)=prime(n^2)-prime(n) \\ Charles R Greathouse IV, Mar 21 2014

Formula

a(n) = A000040(n^2) - A000040(n).

A381850 Primes p preceded and followed by primes whose difference is less than 2*log(p).

Original entry on oeis.org

41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 151, 163, 167, 179, 193, 197, 227, 229, 233, 239, 269, 271, 277, 281, 311, 313, 349, 353, 379, 383, 419, 421, 431, 433, 439, 443, 457, 461, 463, 487, 491, 499, 503, 563, 569, 571, 593, 599, 601, 607, 613, 617, 641, 643, 647, 653
Offset: 1

Views

Author

Alain Rocchelli, May 06 2025

Keywords

Comments

Primes prime(k) such that prime(k+1) - prime(k-1) < 2*log(prime(k)).
Since the geometric mean is never greater than the arithmetic mean: this sequence is a subsequence of A383652.

Examples

			19 is not a term because 23-17=6 and 2*log(19)=5.8889.
41 is a term because 43-37=6 and 2*log(41)=7.4271.
131 is not a term because 137-127=10 and 2*log(131)=9.7504.
137 is a term because 139-131=8 and 2*log(137)=9.8400.
		

Crossrefs

A288907 is a subsequence.

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..1000,2)]):
    P[select(i -> is(P[i+1]-P[i-1] < 2*log(P[i])), [$2..nops(P)-1])]; # Robert Israel, Jun 06 2025
  • Mathematica
    Select[Prime[Range[120]],NextPrime[#] - NextPrime[#,-1] < 2Log[#] &] (* Stefano Spezia, May 06 2025 *)
  • PARI
    forprime(P=3, 800, my(M=precprime(P-1), Q=nextprime(P+1)); if(Q-M<2*log(P), print1(P,", ")));

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1-(3/e^2).

A113728 a(n) is the integer between p(n) and p(n+2) which is divisible by (p(n+2)-p(n)), where p(n) is the n-th prime.

Original entry on oeis.org

3, 4, 6, 12, 12, 18, 18, 20, 24, 32, 40, 42, 42, 50, 48, 56, 64, 70, 72, 72, 80, 80, 84, 96, 102, 102, 108, 108, 126, 126, 130, 136, 144, 144, 152, 156, 160, 170, 168, 176, 180, 192, 192, 198, 210, 216, 224, 228, 228, 230, 240, 240, 256, 252, 264, 264, 272, 280
Offset: 1

Views

Author

Leroy Quet, Nov 08 2005

Keywords

Comments

Exactly one integer exists between each p(n+2) and p(n) which is divisible by (p(n+2)-p(n)).

Examples

			Between the primes 19 and 29 is the composite 20 and 20 is divisible by (29-19)=10. So 20 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    For[n = 1, n < 50, n++, s := Prime[n] + 1; While[Floor[s/(Prime[n + 2] -Prime[n])] != s/(Prime[n + 2] - Prime[n]), s++ ]; Print[s]] (* Stefan Steinerberger, Feb 10 2006 *)
    idp[n_]:=Module[{p1=Prime[n],p2=Prime[n+2]},Select[Range[p1+1,p2-1],Divisible[ #,p2-p1]&]]; Table[idp[n],{n,60}]//Flatten (* Harvey P. Dale, May 30 2021 *)

Formula

a(n) = A031131(n)*ceiling(A000040(n)/A031131(n)). - R. J. Mathar, Aug 31 2007

Extensions

More terms from Stefan Steinerberger, Feb 10 2006
More terms from R. J. Mathar, Aug 31 2007

A155750 First differences of A031215.

Original entry on oeis.org

4, 6, 6, 10, 8, 6, 10, 8, 10, 8, 10, 12, 6, 6, 18, 8, 12, 12, 10, 8, 12, 6, 24, 6, 10, 12, 12, 8, 10, 12, 18, 6, 20, 12, 10, 14, 10, 14, 12, 12, 12, 10, 14, 6, 16, 12, 12, 18, 20, 16, 12, 8, 16, 8, 12, 6, 22, 6, 12, 14, 10, 18, 18, 14, 10, 14, 12, 18, 22, 12, 6, 12, 18, 6, 18, 6, 24
Offset: 1

Views

Author

Paul Curtz, Jan 26 2009

Keywords

Comments

All terms are even. Do all even numbers (A005843) appear at least once?

Crossrefs

Programs

  • Mathematica
    Table[Prime[2*n+2] - Prime[2 n], {n, 80}] (* G. C. Greubel, Jun 05 2021 *)
  • Sage
    [nth_prime(2*n+2) - nth_prime(2*n) for n in (1..80)] # G. C. Greubel, Jun 05 2021

Formula

a(n) = A001223(2n) + A001223(2n+1). - R. J. Mathar, Feb 27 2009
a(n) = A031131(2n). - R. J. Mathar, Feb 27 2009

Extensions

Edited and extended by R. J. Mathar, Feb 27 2009
Previous Showing 21-30 of 41 results. Next