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

A028334 Differences between consecutive odd primes, divided by 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 3, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 2, 7, 2, 3, 1, 5, 1, 3, 3, 2, 3, 3, 1, 5, 1, 2, 1, 6, 6, 2, 1, 2, 3, 1, 5, 3, 3, 3, 1, 3, 2, 1, 5, 7, 2, 1, 2, 7, 3, 5, 1, 2, 3, 4, 3, 3, 2, 3, 4, 2, 4, 5, 1, 5, 1, 3, 2, 3, 4, 2, 1, 2, 6, 4, 2, 4, 2, 3, 6, 1, 9, 3, 5, 3, 3, 1, 3
Offset: 2

Views

Author

Keywords

Comments

With an initial zero, gives the numbers of even numbers between two successive primes. - Giovanni Teofilatto, Nov 04 2005
Equal to difference between terms in A067076. - Eric Desbiaux, Aug 07 2010
The twin prime conjecture is that a(n) = 1 infinitely often. Yitang Zhang has proved that a(n) < 3.5 x 10^7 infinitely often. - Jonathan Sondow, May 17 2013
a(n) = 1 if, and only if, n + 1 is in A107770. - Jason Kimberley, Nov 13 2015

Examples

			23 - 19 = 4, so a(8) = 4/2 = 2.
29 - 23 = 6, so a(9) = 6/2 = 3.
31 - 29 = 2, so a(10) = 2/2 = 1.
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Cf. A005521.
Cf. A000230 (least prime with a gap of 2n to the next prime).
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556 - A330561.

Programs

Formula

a(n) = A001223(n)/2 for n > 1.
a(n) = (prime(n+1) - prime(n)) / 2, where prime(n) is the n-th prime.
a(n) = A047160(A024675(n-1)). - Jason Kimberley, Nov 12 2015
G.f.: (b(x)/((x + 1)/((1 - x)) - 1) - 1 - x/2)/x, where b(x) is the g.f. of A000040. - Mario C. Enriquez, Dec 10 2016

Extensions

Replaced multiplication by division in the cross-reference R. J. Mathar, Jan 23 2010
Definition corrected by Jonathan Sondow, May 17 2013
Edited by Franklin T. Adams-Watters, Aug 07 2014

A065917 Boundaries of primorial intervals [1,3]; [3,9],[9,15]; [15,45], etc.

Original entry on oeis.org

1, 3, 9, 15, 45, 75, 105, 315, 525, 735, 945, 1155, 3465, 5775, 8085, 10395, 12705, 15015, 45045, 75075, 105105, 135135, 165165, 195195, 225225, 255255, 765765, 1276275, 1786785, 2297295, 2807805, 3318315, 3828825, 4339335, 4849845
Offset: 1

Views

Author

Frank Ellermann, Dec 08 2001

Keywords

Examples

			a(4)= 15= a(3)+q(2)= 9+ 6, a(7)= 105= a(6)+q(3)= 75+ 30,
a(5)= 45= a(4)+q(3)=15+30, a(8)= 315= a(7)+q(4)=105+210.
		

Crossrefs

Primorial q(j)= A002110(j), interval count A005521(j+1)-1.

Formula

a(n+1)= a(n)+q(j) for primorial q(j) < a(n+1) <= q(j+1)/2.

A239738 Triangle read by rows: T(n,k) is the number of n-tuples with sum k + n whose i-th element is a positive integer <= prime(i), 0 <= k < A070826(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 6, 1, 4, 9, 15, 21, 26, 29, 1, 5, 14, 29, 50, 76, 105, 134, 160, 181, 196, 204, 1, 6, 20, 49, 99, 175, 280, 414, 574, 755, 951, 1155, 1359, 1554, 1730, 1876, 1981, 2036, 1, 7, 27, 76, 175, 350, 630, 1044, 1618, 2373, 3324, 4479, 5838, 7392, 9122, 10998, 12979, 15014, 17044, 19005, 20832, 22463, 23842, 24921, 25662, 26039
Offset: 1

Views

Author

Stuart Cooper, Mar 26 2014

Keywords

Comments

Original name: Normal distributions from the primes. The contracted sequence of integers generated from the frequencies of the summation of elements of the subsets of the Cartesian product of the natural numbers of ascending prime cardinality. That is, given a number of sets of the natural numbers of ascending modulo P(n+1), the probabilities of generating a given number from the selection of one element from each set form the given sequence.
Although this sequence initially appears similar to A131791, its derivation is entirely different and it deviates quickly.
By sets of natural numbers of ascending prime cardinality, it is meant
N_1 = {1,2}, N_2 = {1,2,3}, N_3 = {1,2,3,4,5}, N_4 = {1,2,3,4,5,6,7}, ..., N_w = {1,2,3,...,p_w}, where the p_i are primes.
with Cartesian products
N_1 X N_2 = {1,2} X {1,2,3} = {(1,1),(1,2),(1,3),(2,1),(2,2),(2,3)}, etc.
and the sum of the elements of the product's subsets denoted
Sum[N_1 X N_2] = {(2),(3),(4),(3),(4),(5)}
whose elements have the frequencies [1,2,2,1] (with respect to magnitude). It is these frequencies that form the sequence, the symmetry allows for the omission of repeated terms, and hence the following contraction halves the data without loss of information:
[1,1] -> [1]
[1,2,2,1] -> [1,2]
[1,3,5,6,6,5,3,1] -> [1,3,5,6]
and so forth.
When arranged by row of the number of sets used, then P(S(u,r) = u + r - 1) = T(r,u)/prime(r)#, P(S = X) the probability that the sum S equals the value X, and prime(r)# is the product of the first r primes (A002110), then the structure and symmetry become more apparent.
Each row contains l(r) = (1/2)*(Sum p(r) - r + 1) terms and clearly the sum of each row must equal half the product of the primes used,
Sum_{u=1..l(r)} T(r,u) = (1/2)*prime(r)#,
and one can see that in general for all u, r:
P(S(u,r) = r) = P(S(u,r) = Sum p(r)) = 1/Product p(r),
P(S(u,r) = r + 1) = P(S(u,r) = Sum p(r) - 1) = r/prime(r)#,
P(S = r + i) = P(S = Sum p(r) - i) = T(r,u+i)/prime(r)#, [0 <= i <= l(r) - 1)],
S(u,r) ~ N(mu(r),sigma(r)^2).

Examples

			Triangle T(n,k) begins: (n >= 1, k >= 0)
  1;
  1, 2;
  1, 3,  5,  6;
  1, 4,  9, 15, 21,  26,  29;
  1, 5, 14, 29, 50,  76, 105, 134, 160, 181, 196,  204;
  1, 6, 20, 49, 99, 175, 280, 414, 574, 755, 951, 1155, 1359, 1554, 1730, 1876, 1981, 2036;
  ...
T(3, 2) = 5 because the following 3-tuples have sum 2 + 3 = 5: (1,1,3), (1,2,2), (1,3,1), (2,1,2), (2,2,1). The tuple (3,1,1) is excluded because the 1st term is required to be no greater than prime(1) = 2.
		

Crossrefs

Row sums are A070826.
Cf. A005521 (row lengths).

Programs

  • Mathematica
    row[r_]:=Drop[#,-Length[#]/2]&[Transpose[Tally[Total[Tuples[Table[Range[1,Prime[k]],{k,1,r}]],{2}]]][[2]]] (* generates row r of the table *)
    Grid@Table[row[r],{r,1,7}] (* generates the table *)
    Flatten@Table[row[r],{r,1,7}] (* generates the sequence *) (* Steven Foster Clark, Feb 02 2023 *)
    row[r_]:=Drop[#,-Length[#]/2]&[CoefficientList[1/(x-1)^r Product[(x^Prime[i]-1),{i,1,r}],x]] (* generates row r of the table *) (* Steven Foster Clark, Feb 07 2023 *)
  • PARI
    row(n)={my(v=Vecrev(prod(i=1, n, 1 - x^prime(i))/(1 - x)^n)); v[1..#v/2]} \\ Andrew Howroyd, Feb 06 2023

Formula

T(n,k) = [x^k] (1/(x-1)^n) * Product_{i=1..n} (x^prime(i)-1). - Steven Foster Clark, Feb 05 2023
T(n,k) = [x^k] Product_{i=1..n} Sum_{j=0..prime(i)-1} x^j. - Andrew Howroyd, Feb 05 2023

Extensions

Name edited by Andrew Howroyd, Feb 05 2023
Showing 1-3 of 3 results.