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-4 of 4 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).

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

Original entry on oeis.org

9, 11, 15, 16, 18, 21, 23, 32, 36, 37, 39, 40, 46, 47, 51, 54, 55, 56, 58, 67, 71, 73, 74, 76, 84, 86, 91, 96, 97, 99, 100, 102, 103, 105, 107, 108, 110, 111, 114, 118, 119, 121, 123, 129, 130, 133, 139, 160, 161, 164, 165, 167, 168, 170, 174, 179, 180, 184, 185, 187, 188, 194, 195, 197, 199, 200, 202, 203, 205, 208, 210
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

Numbers n for which A001223(n) = 0 modulo 3.
See comments in A270189 and A269364.
Equivalently, numbers n for which prime(n+1)-prime(n) is a multiple of six. See A276414 for runs of increasing length of consecutive integers. - M. F. Hasler, Sep 03 2016

Examples

			9 is present as the difference between A000040(9+1) = 29 and A000040(9) = 23 is 6, a multiple of three.
		

Crossrefs

Complement: A270189.
Positions of zeros in A137264.
Left inverse: A269850.

Programs

  • Mathematica
    Select[Range@ 210, Divisible[Prime[# + 1] - Prime@ #, 3] &] (* Michael De Vlieger, Mar 17 2016 *)
    PrimePi/@Select[Partition[Prime[Range[350]],2,1],Divisible[#[[2]]-#[[1]], 3]&][[All,1]] (* Harvey P. Dale, Jul 11 2017 *)
  • PARI
    isok(n) = ((prime(n+1) - prime(n)) % 3) == 0; \\ Michel Marcus, Mar 17 2016

Formula

Other identities. For all n >= 1:
a(n) = A269399(n) + 6.
A269850(a(n)) = n.

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Table[Count[Select[Range@ 125, Mod[Prime[# + 1] - Prime@ #, 3] != 0 &], k_ /; k <= n], {n, 85}] (* Michael De Vlieger, Mar 17 2016 *)
    Accumulate[If[Mod[#,3]==0,0,1]&/@Differences[Prime[Range[90]]]] (* Harvey P. Dale, Apr 15 2024 *)
  • 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(A270189(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-4 of 4 results.