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

A117876 Primes p=prime(k) of level (1,2), i.e., such that A118534(k) = prime(k-2).

Original entry on oeis.org

23, 47, 73, 233, 353, 647, 1097, 1283, 1433, 1453, 1493, 1613, 1709, 1889, 2099, 2161, 2383, 2621, 2693, 2713, 3049, 3533, 3559, 3923, 4007, 4133, 4643, 4793, 4937, 5443, 5743, 6101, 7213, 7309, 7351, 7561, 7621, 7829, 8179, 8237, 8719, 8849, 9109, 9343, 9467
Offset: 1

Views

Author

Rémi Eismann, May 02 2006

Keywords

Comments

If prime(k) has level 1 in A117563, and if 2*prime(k) - prime(k+1) = prime(k-i), then we say that prime(k) has level (1,i). Sequence gives primes of level (1,2).
The prime p(4)=7 cannot be decomposed into weight*level+gap (<=> A117563(4)=0 <=> A118534(4)=0 <=> A117078(4)=0). For all other primes, an equivalent definition would be: Primes p(k) such that 2*p(k) - p(k+1) = p(k-2). - Rémi Eismann and M. F. Hasler, Nov 08 2009

Examples

			29 = 2*23 - 17, 2179 = 2*2161 - 2143, 5749 = 2*5743 - 5737.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 2}, Prime@ Select[Range[m + 1, 1200], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    for(n=5,9999, 2*prime(n)-prime(n+1) == prime(n-2) & print1(prime(n),",")) \\ M. F. Hasler, Nov 08 2009
    
  • PARI
    is_A117876(p)={ isprime(p) & isprime(d=2*p-nextprime(p+2)) & d == precprime(precprime(p-2)-2) & p>7 } \\ M. F. Hasler, Nov 08 2009
    
  • Scheme
    (define (A117876 n) (A000040 (A066495 (+ 1 n)))) ;; Antti Karttunen, Nov 30 2013

Formula

a(n) = A000040(A066495(n+1)). - Antti Karttunen, Nov 30 2013

Extensions

Edited by N. J. A. Sloane, May 14 2006
More terms from Rémi Eismann, May 25 2006
Definition corrected and terms double-checked by M. F. Hasler, Nov 08 2009

A138042 Numbers k such that A096379(k)=A096379(k+1).

Original entry on oeis.org

2, 7, 13, 19, 49, 69, 116, 182, 206, 225, 229, 236, 253, 265, 288, 315, 324, 352, 379, 390, 394, 435, 492, 497, 542, 551, 567, 625, 643, 658, 718, 754, 794, 920, 930, 935, 958, 966, 988, 1025, 1032, 1085, 1101, 1128, 1155, 1171, 1173, 1225, 1235, 1249
Offset: 1

Views

Author

Zak Seidov, Mar 02 2008

Keywords

Comments

Numbers k such that prime(k)=2*prime(k+2)-prime(k+3).

Examples

			n=2: {prime(n), 2*prime(n+2)-prime(n+3)}={3,2*7-11},
n=7: {prime(7), 2*prime(9)-prime(10)}={17,2*23-29},
n=13: {prime(13), 2*prime(15)-prime(16)}={41,2*47-53},
n=19: {prime(19), 2*prime(21)-prime(22)}={67,2*73-79}.
		

Crossrefs

Programs

  • Mathematica
    Do[If[Prime[n]==2Prime[n+2]-Prime[n+3],Print[n]],{n,1,50000}]
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A138042 (MATCHING-POS 1 1 (lambda (n) (= 2 (/ (+ (A000040 n) (A000040 (+ n 3))) (A000040 (+ n 2)))))))

Formula

a(n) = A066495(n) - 2.

Extensions

Formula corrected by Antti Karttunen, Jul 13 2013

A109226 If g(x) is the x-th prime gap, then g(a(n)) are prime gaps which are greater than the sum of the preceding two prime gaps.

Original entry on oeis.org

30, 34, 42, 46, 53, 61, 62, 66, 91, 97, 99, 106, 114, 121, 137, 145, 146, 150, 154, 162, 172, 175, 180, 189, 203, 214, 217, 221, 232, 239, 250, 258, 259, 263, 266, 274, 278, 289, 293, 297, 304, 309, 316, 319, 324, 331, 334, 335, 338, 342, 344, 350, 357, 360
Offset: 1

Views

Author

Ray G. Opao, Aug 19 2005

Keywords

Examples

			34 is in the sequence because if g(34) = 35th_prime - 34th_prime = 149 - 139 = 10 and g(33) = 34th_prime - 33rd_prime = 139 - 137 = 2 and g(32) = 33rd_prime - 32nd_prime = 137 - 131 = 6, then g(34) > g(33) + g(32) or 10 > 2 + 6
		

Crossrefs

Programs

  • Mathematica
    g[n_] := Prime[n + 1] - Prime[n]; Select[Range[3, 360], g[ # ] > g[ # - 1] + g[ # - 2] &] (* Ray Chandler, Aug 23 2005 *)

Extensions

Extended by Ray Chandler, Aug 23 2005

A309720 Numbers of the form p+q-r = q+r-s where p < q < r < s are consecutive primes.

Original entry on oeis.org

1, 13, 37, 65, 223, 343, 637, 1087, 1273, 1423, 1445, 1483, 1603, 1687, 1867, 2077, 2135, 2375, 2605, 2683, 2705, 3029, 3523, 3545, 3913, 3997, 4123, 4633, 4783, 4927, 5435, 5735, 6079, 7205, 7295, 7331, 7547, 7589, 7811, 8159, 8227, 8701, 8827, 9085, 9335, 9457, 9461, 9923, 10057
Offset: 1

Views

Author

Philip Mizzi, Aug 14 2019

Keywords

Comments

The consecutive primes (p,q,r,s) satisfy 2*(r-p) = s-p. Define (p,q,r,s) = (p,p+dq,p+dr,p+ds), then 2*dr = ds. For n > 1, (r-p) == 0 (mod 6). - A.H.M. Smeets, Aug 17 2019
Correspond to where prime(i) - (prime(i+2)-prime(i+1)) values repeat. For example, 13 is obtained via both 19 - (29-23) and 17 - (23-19). - Bill McEachen, Jan 03 2021

Examples

			Consider 4 consecutive primes (3,5,7,11), 3+5-7 = 1 = 5+7-11. 1 is a member of the sequence.
Consider 4 consecutive primes (59,61,67,71), 59+61-67 = 53 but, 61+67-71 = 57. These two sums are not equal so neither number is part of the sequence.
		

Crossrefs

Programs

  • Mathematica
    upto[n_]:=Block[{p,q,r,s,t,v}, Union[ Reap[ Do[ {p,q,r,s}=t; v=p+q-r; If[ v==q+r-s <= n, Sow@ v], {t, Partition[ Prime[ Range[ 4+ PrimePi[ 2*n] ]], 4,1]}]] [[2,1]]]]; upto[11000] (* Giovanni Resta, Sep 06 2019 *)
    #[[1]]+#[[2]]-#[[3]]&/@Select[Partition[Prime[Range[2000]],4,1],#[[1]]+#[[2]]- #[[3]] == #[[2]]+#[[3]]-#[[4]]&] (* Harvey P. Dale, Sep 21 2022 *)

Extensions

More terms from Michel Marcus, Aug 14 2019

A375087 Numbers added to cumulative correction term in order for prime numbers to resemble a recursive sequence.

Original entry on oeis.org

0, 1, 0, 4, 2, 4, 2, 0, 8, 2, 4, 8, 2, 0, 4, 10, 2, 4, 8, 0, 4, 4, 2, 10, 10, 2, 4, 2, -8, 14, 12, 8, -2, 10, 6, 2, 8, 4, 4, 10, -2, 10, 8, 4, -6, 2, 20, 14, 2, 0, 8, -2, 6, 10, 6, 10, 2, 4, 8, -4, -2, 20, 16, 2, -8, 12, 10, 14, 8, 0, 2, 8, 8, 8, 4, 2, 10, 4, 2, 16, 2, 10
Offset: 1

Views

Author

Kaleb Williams, Jul 29 2024

Keywords

Comments

At n=1, prime(n+2) = prime(n+1) + prime(n) but thereafter such a form must be reduced by a "correction" amount prime(n+2) = prime(n+1) + prime(n) - A096379(n), and the present sequence is how that correction changes.

Examples

			For n = 1: a(1) = p_2 + p_1 - p_3 - (Sum_{i <= 0} a(i)) = p_2 + p_1 - p_3 ==> a(1) = 3 + 2 - 5 = 0 ==> a(1) = 0.
For n = 2: a(2) = p_3 + p_2 - p_4 - (Sum_{i <= 1} a(i)) = p_3 + p_2 - p_4 - a(1) ==> a(2) = 5 + 3 - 7 - 0 = 1 ==> a(2) = 1.
For n = 3: a(3) = p_4 + p_3 - p_5 - (Sum_{i <= 2} a(i)) = p_4 + p_3 - p_5 - (a(1) + a(2)) ==> a(3) = 7 + 5 - 11 - (0 + 1) = 0 ==> a(3) = 0.
		

Crossrefs

Cf. A096379 (partial sums), A066495 (indices of 0's).

Programs

  • PARI
    lista(nn) = my(va = vector(nn)); for (n=1, nn, va[n] = prime(n+1) + prime(n) - prime(n+2) - sum(i=1, n-1, va[i]);); va; \\ Michel Marcus, Jul 30 2024

Formula

a(n) = 2*prime(n+1) - prime(n+2) - prime(n-1), for n>=2.
a(n) = A096379(n) - A096379(n-1), for n>=2.
prime(n+2) = prime(n+1) + prime(n) - Sum_{i=1..n} a(i)
a(n) = prime(n+1) + prime(n) - prime(n+2) - Sum_{i=0..n-1} a(i).
Showing 1-5 of 5 results.