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

A119912 Scan A076368, discard any nonprimes.

Original entry on oeis.org

2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 5, 3, 5, 3, 5, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 5, 3, 5, 7, 11, 3, 5, 7, 7, 7, 5, 7, 5, 11, 3, 11, 3, 7, 5, 7, 5, 3, 5, 13, 5, 5, 7, 13, 3, 19, 7, 11, 7, 7, 3, 7, 11, 7, 7, 3
Offset: 0

Views

Author

Keywords

Comments

Primes that are one greater than the difference between consecutive primes.

Examples

			The first 4 consecutive prime pairs are (2,3),(3,5),(5,7),(7,11). The differences + 1 are the primes 2,3,3,5, the first four entries in the sequence.
		

Crossrefs

Cf. A076368.

Programs

  • Maple
    P:=proc(n) local cont,i,j,k,w; for i from 1 by 1 to n do k:=ithprime(i); w:=ithprime(i+1); if isprime(w-k+1) then print(w-k+1); fi; od; end: P(10000);
  • Mathematica
    Select[Differences[Prime[Range[200]]]+1,PrimeQ] (* Harvey P. Dale, Jul 02 2017 *)
  • PARI
    diffp1p2(n) = { local(p1,p2,y); for(x=1,n, p1=prime(x); p2=prime(x+1); y=(p2-p1)+1; if(isprime(y), print1(y",") ) ) } \\ Cino Hilliard, May 23 2007

Extensions

Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar

A106587 Sum of n-th prime squared and n-th perfect square.

Original entry on oeis.org

5, 13, 34, 65, 146, 205, 338, 425, 610, 941, 1082, 1513, 1850, 2045, 2434, 3065, 3770, 4045, 4850, 5441, 5770, 6725, 7418, 8497, 10034, 10877, 11338, 12233, 12722, 13669, 17090, 18185, 19858, 20477, 23426, 24097, 26018, 28013, 29410, 31529, 33722
Offset: 1

Views

Author

Alexandre Wajnberg, May 10 2005

Keywords

Examples

			a(5)=146 because 121 (fifth prime^2) + 25 (fifth square) = 146.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2 + n^2: n in [1..50]]; // G. C. Greubel, Sep 07 2021
    
  • Mathematica
    Table[Prime[n]^2 + n^2, {n, 50}]
  • PARI
    a(n) = n^2 + prime(n)^2; \\ Michel Marcus, Sep 08 2021
  • Sage
    [nth_prime(n)^2 + n^2 for n in (1..50)] # G. C. Greubel, Sep 07 2021
    

Formula

a(n) = n^2 + prime(n)^2.

Extensions

Extended by Ray Chandler, May 13 2005

A076367 Primes with subscripts from the Bonse sequence.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 7, 7, 11, 11, 11, 11, 11, 13, 13, 13, 17, 17, 17, 17, 17, 19, 19, 19, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 37, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 41, 43, 43, 43, 47, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59
Offset: 1

Views

Author

Labos Elemer, Oct 14 2002

Keywords

Comments

This and sequence A060646 was used to prove that 30 is the largest number whose RRS does not contain composite numbers. See A048597, A060646 and corresponding References.

Crossrefs

Cf. A048597, A060646, A076368. See also A076366.

Programs

  • Mathematica
    c[x_, j_] := x+1-(j+Prime[j]); c[x, 0]=x; a=1000; t=Table[0, {a}]; t1=Table[0, {a}]; Table[fl=1; (*Print["% ", u, " #"]; *)Do[s=c[u, n]; If[Equal[fl, 1]&&Equal[Sign[s], -1], Print[n]; t[[u]]=n; t1[[u]]=Prime[n]; fl=0], {n, 1, u}], {u, 1, a}] //t (*=A060646*)//t1 (* =A076367 *)

Formula

a(n) = prime(A060646(n)).

A106588 Difference between n-th prime squared and n-th perfect square.

Original entry on oeis.org

3, 5, 16, 33, 96, 133, 240, 297, 448, 741, 840, 1225, 1512, 1653, 1984, 2553, 3192, 3397, 4128, 4641, 4888, 5757, 6360, 7345, 8784, 9525, 9880, 10665, 11040, 11869, 15168, 16137, 17680, 18165, 20976, 21505, 23280, 25125, 26368, 28329, 30360
Offset: 1

Views

Author

Alexandre Wajnberg, May 10 2005

Keywords

Examples

			a(5) = 96 because 121 (fifth prime^2) - 25 (fifth square) = 96.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2 - n^2: n in [1..50]]; // G. C. Greubel, Sep 07 2021
    
  • Mathematica
    Table[Prime[n]^2 - n^2, {n, 50}]
  • PARI
    a(n) = prime(n)^2 - n^2; \\ Michel Marcus, Sep 08 2021
  • Sage
    [nth_prime(n)^2 - n^2 for n in (1..50)] # G. C. Greubel, Sep 07 2021
    

Formula

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

Extensions

Extended by Ray Chandler, May 13 2005

A226534 a(n) = (p(n+1) + p(n) - 1) mod (p(n+1) - p(n) + 1) where p(n) is the n-th prime.

Original entry on oeis.org

0, 1, 2, 2, 2, 4, 2, 1, 2, 2, 4, 2, 2, 4, 1, 6, 2, 1, 2, 2, 4, 1, 3, 5, 2, 2, 4, 2, 1, 14, 2, 1, 2, 1, 2, 6, 4, 4, 3, 1, 2, 8, 2, 4, 2, 6, 4, 4, 2, 1, 2, 2, 7, 3, 1, 6, 2, 1, 2, 2, 3, 14, 2, 2, 4, 2, 2, 1, 2, 1, 4, 5, 4, 2, 1, 1, 2, 2, 8, 2, 2, 4, 2, 3, 1, 2, 5, 2, 2, 4, 9, 2, 2, 8, 1, 3, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 31 2013

Keywords

Programs

  • Mathematica
    Table[Mod[Prime[p + 1] + Prime[p] - 1, Prime[p + 1] - Prime[p] + 1], {p, 100}] (* Alonso del Arte, Jan 18 2014 *)
    Mod[Total[#]-1,#[[2]]-#[[1]]+1]&/@Partition[Prime[Range[100]],2,1] (* Harvey P. Dale, Mar 16 2023 *)
  • PARI
    a(n)=lift(Mod(prime(n+1)+prime(n)-1,prime(n+1)-prime(n)+1)) /* Ralf Stephan, Sep 03 2013 */

Formula

a(n) = A076273(n+1) mod A076368(n+1).

A140785 a(n) = the single integer k, where p(n) <= k <= p(n+1), that is divisible by (p(n+1)-p(n)+1), where p(n) is the n-th prime.

Original entry on oeis.org

2, 3, 6, 10, 12, 15, 18, 20, 28, 30, 35, 40, 42, 45, 49, 56, 60, 63, 70, 72, 77, 80, 84, 90, 100, 102, 105, 108, 110, 120, 130, 133, 138, 143, 150, 154, 161, 165, 168, 175, 180, 187, 192, 195, 198, 208, 221, 225, 228, 230, 238, 240, 242, 252, 259, 266, 270, 273
Offset: 1

Views

Author

Leroy Quet, Jul 13 2008

Keywords

Crossrefs

Programs

  • Mathematica
    (#[[2]]-#[[1]]+1)Floor[#[[2]]/(#[[2]]-#[[1]]+1)]&/@Partition[ Prime[ Range[ 60]],2,1] (* Harvey P. Dale, Apr 07 2018 *)

Formula

a(n) = (p(n+1)-p(n)+1) * floor(p(n+1)/(p(n+1)-p(n)+1)), where p(n) is the n-th prime.

Extensions

More terms from Diana L. Mecum, Jul 21 2008

A224934 Primes p for which there exists no prime q, different from p, such that p+q-1 is the next prime after p.

Original entry on oeis.org

2, 3, 89, 113, 293, 317, 359, 389, 401, 449, 479, 491, 683, 701, 719, 743, 761, 773, 839, 863, 887, 911, 929, 953, 983, 1109, 1163, 1193, 1327, 1373, 1409, 1439, 1523, 1559, 1571, 1583, 1637, 1669, 1733, 1823, 1847, 1979, 2003, 2039, 2153, 2179, 2213, 2243
Offset: 1

Views

Author

Jayanta Basu, Apr 20 2013

Keywords

Comments

If we relax the restriction on q, where q is different from p, 2 and 3 fail to be members of this sequence.
Primes p = prime(k) for which A076368(k+1) = p or A076368(k+1) is composite. - Robert Israel, Nov 21 2016

Examples

			89 is in the list because there exists no prime q such that 89 + q - 1 = 97.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # to get all terms p for which the next prime <= N
    P:= select(isprime, [2,seq(i,i=3..N,2)]):
    G:= P[2..-1]-P[1..-2]:
    P[select(t -> G[t]=P[t]-1 or not isprime(G[t]+1), [$1..nops(G)])]; # Robert Israel, Nov 21 2016
  • Mathematica
    t = {}; Do[p = Prime[n]; If[FreeQ[Table[k = p + Prime[i] - 1, {i, n - 1}], Prime[n + 1]], AppendTo[t, p]], {n, 335}]; t

A230846 1 + A075526(n).

Original entry on oeis.org

2, 2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 9, 5, 3, 5, 3, 5, 15, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 15, 5, 3, 5, 15, 7, 11, 3, 5, 7, 9, 7, 7, 5, 7, 9, 5, 9, 11, 3, 11, 3, 7, 5, 7, 9, 5, 3, 5, 13, 9, 5, 9, 5, 7
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2013

Keywords

Comments

Partial sums give A095116.

Examples

			On the first quadrant of the square grid consider a diagram in which the n-th horizontal bar contains A006093(n) cells and in which the number of cells in the vertical bars gives A000720 as shown below. a(n) is the sum of the length of the n-th horizontal boundary segment and the length of the n-th vertical boundary segment between the structure formed by the horizontal bars and the structure formed by the vertical bars, hence a(n) = A075526(n) + 1. The total length of the boundary segments from [0, 0] after n-th stage is A095116(n).
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
30  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
28  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
22  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
18  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
16  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
12  |_ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
10  |_ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
6   |_ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
4   |_ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
2   |_ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
1   |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
.    0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
.
		

Crossrefs

Essentially the same as A076368.

A230847 a(n) = 1 + A054541(n).

Original entry on oeis.org

3, 2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 9, 5, 3, 5, 3, 5, 15, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 15, 5, 3, 5, 15, 7, 11, 3, 5, 7, 9, 7, 7, 5, 7, 9, 5, 9, 11, 3, 11, 3, 7, 5, 7, 9, 5, 3, 5, 13, 9, 5, 9, 5, 7
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2013

Keywords

Comments

Partial sums give A014688.

Examples

			On the first quadrant of the square grid consider a diagram in which the n-th horizontal bar contains A000040(n) cells and in which the number of cells in the vertical bars gives 0 together with A000720 as shown below. a(n) is the sum of the length of the n-th horizontal boundary segment and the length of the n-th vertical boundary segment between the structure formed by the horizontal bars and the structure formed by the vertical bars, hence a(n) = A054541(n) + 1. The total length of the boundary segments from [0, 0] after n-th stage is A014688(n).
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13  |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11  |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7   |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5   |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3   |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2   |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
.    0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
.
		

Crossrefs

Formula

a(n) = A230846(n) = A076368(n), n>1. - R. J. Mathar, May 16 2023
Showing 1-9 of 9 results.