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

A066495 Numbers k such that f(k) = f(k-1) + f(k-2) where f denotes the prime gaps function given by f(m) = prime(m+1) - prime(m).

Original entry on oeis.org

4, 9, 15, 21, 51, 71, 118, 184, 208, 227, 231, 238, 255, 267, 290, 317, 326, 354, 381, 392, 396, 437, 494, 499, 544, 553, 569, 627, 645, 660, 720, 756, 796, 922, 932, 937, 960, 968, 990, 1027, 1034, 1087, 1103, 1130, 1157, 1173, 1175, 1227, 1237, 1251
Offset: 1

Views

Author

Joseph L. Pe, Jan 03 2002

Keywords

Examples

			f(9) = 6 = 4 + 2 = f(8) + f(7); so 9 is a term.
		

Crossrefs

Cf. A000040 (function p in the definition).
Cf. A001223 (function f in the definition).
Cf. also A109226, A138042, A227419.

Programs

  • Mathematica
    f[n_] := Prime[n + 1] - Prime[n]; Select[Range[3, 10^4], f[ # ] == f[ # - 1] + f[ # - 2] &]

Formula

a(n) = A138042(n) + 2 [based on the formula found from A138042]. - Antti Karttunen, Jul 13 2013

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