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.

A269364 Difference between the number of occurrences of prime gaps not divisible by 3, versus number of prime gaps that are multiples of 3, up to n-th prime gap: a(n) = A269849(n) - A269850(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 7, 8, 7, 8, 9, 10, 9, 8, 9, 8, 9, 10, 9, 10, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 18, 17, 18, 17, 16, 17, 18, 19, 20, 21, 20, 19, 20, 21, 22, 21, 22, 23, 22, 21, 20, 21, 20, 21, 22, 23, 24, 25, 26, 27, 28, 27, 28, 29, 30, 29, 30, 29, 28, 29, 28, 29, 30, 31, 32, 33, 34, 35, 34
Offset: 1

Views

Author

Antti Karttunen, Mar 17 2016

Keywords

Comments

This is related to "Lemke Oliver-Soundararajan bias", term first used by Terence Tao March 14, 2016 in his blog.

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, ((prime(k+1) - prime(k)) % 3) != 0) - sum(k=1, n, ((prime(k+1) - prime(k)) % 3) == 0); \\ Michel Marcus, Mar 18 2016
  • Scheme
    (define (A269364 n) (- (A269849 n) (A269850 n)))
    

Formula

a(n) = A269849(n) - A269850(n).

A270189 Numbers n for which (prime(n+1)-prime(n)) is not a multiple of three.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 17, 19, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 38, 41, 42, 43, 44, 45, 48, 49, 50, 52, 53, 57, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 72, 75, 77, 78, 79, 80, 81, 82, 83, 85, 87, 88, 89, 90, 92, 93, 94, 95, 98, 101, 104, 106, 109, 112, 113, 115, 116, 117, 120, 122, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

See A269364 for the effect of the bias that favors these terms over the terms of A270190.

Crossrefs

Complement: A270190.
Disjoint union of A270191 and A270192.
Positions of 1's and 2's in A137264.
Left inverse: A269849.

Programs

  • Mathematica
    Select[Range@ 125, Mod[Prime[# + 1] - Prime@ #, 3] != 0 &] (* Michael De Vlieger, Mar 17 2016 *)
  • PARI
    isok(n) = ((prime(n+1) - prime(n)) % 3) != 0; \\ Michel Marcus, Mar 17 2016

Formula

Other identities. For all n >= 1:
A269849(a(n)) = n.

A269362 Least monotonic left inverse of A269389.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 21, 22, 22, 22, 23, 24, 25, 26, 27, 27, 27, 28, 29, 30, 30, 31, 32, 32, 32, 32, 33, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 42, 43, 44, 44, 45, 45, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 53, 54, 54, 55, 56, 57
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

a(n) = number of terms of A269389 <= n.

Crossrefs

Cf. also A270193, A270199.

Formula

a(n) = A269849(6+n) - 6.
Other identities. For all n >= 1:
a(A269389(n)) = n.

A269850 a(n) = number of integers k <= n for which prime(k+1)-prime(k) is a multiple of three.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 10, 10, 11, 12, 12, 12, 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 22, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 27
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

a(n) = number of terms of A270190 <= n, the least monotonic left inverse of A270190.
See comments at A269364.

Crossrefs

Programs

  • Mathematica
    Table[Count[Select[Range@ 125, Divisible[Prime[# + 1] - Prime@ #, 3] &], k_ /; k <= n], {n, 91}] (* Michael De Vlieger, Mar 17 2016 *)
  • PARI
    a(n) = sum(k=1, n, ((prime(k+1) - prime(k)) % 3) == 0); \\ Michel Marcus, Mar 18 2016

Formula

Other identities. For all n >= 1:
a(A270190(n)) = n.

A270201 Permutation of natural numbers: a(1) = 1, a(A270189(1+n)) = 2 * a(n), a(A270190(n)) = 1 + 2*a(n).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 3, 256, 5, 6, 512, 10, 9, 17, 12, 33, 1024, 20, 65, 18, 129, 34, 24, 66, 2048, 40, 130, 36, 258, 257, 68, 48, 132, 7, 513, 4096, 11, 13, 80, 260, 72, 516, 514, 1025, 21, 136, 96, 264, 19, 14, 1026, 35, 25, 67, 8192, 2049, 22, 26, 160, 520, 144, 1032, 1028, 2050, 41, 42, 272, 192, 131, 528, 37, 259, 38, 69, 28
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Crossrefs

Inverse: A270202.
Similar permutation: A270193.

Formula

a(1) = 1, for n > 1, if A137264(n) = 0 [when n is in A270190], a(n) = 1 + 2*a(A269850(n)), otherwise a(n) = 2 * a(A269849(n)-1).
Showing 1-5 of 5 results.