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

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.

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.

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

A269389 Numbers n for which prime(n+7)-prime(n+6) is not a multiple of three.

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 11, 13, 14, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 32, 35, 36, 37, 38, 39, 42, 43, 44, 46, 47, 51, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 66, 69, 71, 72, 73, 74, 75, 76, 77, 79, 81, 82, 83, 84, 86, 87, 88, 89, 92, 95, 98, 100, 103, 106, 107, 109, 110, 111, 114, 116, 118, 119, 120, 121, 122, 125
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Crossrefs

Complement: A269399.
Left inverse: A269362.
Cf. A270189.
Cf. also A270199.

Programs

Formula

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

A270199 Self-inverse permutation of natural numbers: a(1) = 1, a(A269389(1+n)) = A269399(a(n)), a(A269399(n)) = A269389(1+a(n)).

Original entry on oeis.org

1, 3, 2, 9, 6, 5, 30, 15, 4, 16, 12, 11, 93, 45, 8, 10, 46, 48, 34, 33, 266, 124, 26, 31, 127, 23, 154, 99, 97, 7, 24, 727, 20, 19, 352, 80, 94, 357, 68, 141, 69, 446, 278, 272, 14, 17, 70, 18, 71, 73, 1902, 54, 61, 52, 946, 232, 267, 957, 197, 408, 53, 199, 1174, 763, 407, 751, 186, 39, 41, 47, 49, 202, 50, 204, 210, 4724, 164, 192, 182, 36
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Crossrefs

Related or similar permutations: A267107, A270193, A270194.

Formula

a(1) = 1, for n > 1, if A137264(6+n) = 0 [when n is in A269399], a(n) = A269389(1+a(n-A269362(n))), otherwise a(n) = A269399(a(A269362(n)-1)).

A269399 Numbers n for which prime(n+7)-prime(n+6) is a multiple of three.

Original entry on oeis.org

3, 5, 9, 10, 12, 15, 17, 26, 30, 31, 33, 34, 40, 41, 45, 48, 49, 50, 52, 61, 65, 67, 68, 70, 78, 80, 85, 90, 91, 93, 94, 96, 97, 99, 101, 102, 104, 105, 108, 112, 113, 115, 117, 123, 124, 127, 133, 154, 155, 158, 159, 161, 162, 164, 168, 173, 174, 178, 179, 181, 182, 188, 189, 191, 193, 194, 196, 197, 199, 202, 204, 208, 210
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Examples

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

Crossrefs

Complement: A269389.
Cf. also A270199.

Programs

  • Mathematica
    Select[Range@ 210, Divisible[Prime[# + 7] - Prime[# + 6], 3] &] (* Michael De Vlieger, Mar 18 2016 *)
  • PARI
    isok(n) = ((prime(n+7) - prime(n+6)) % 3) == 0; \\ Michel Marcus, Mar 18 2016

Formula

a(n) = A270190(n) - 6.

A270193 Permutation of natural numbers: a(1) = 1, a(A269389(1+n)) = 2 * a(n), a(A269399(n)) = 1 + 2*a(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 7, 9, 12, 11, 16, 20, 13, 14, 17, 18, 24, 22, 32, 40, 26, 28, 34, 21, 36, 48, 44, 15, 19, 64, 25, 23, 80, 52, 56, 68, 42, 33, 41, 72, 96, 88, 27, 30, 38, 29, 35, 37, 128, 49, 50, 46, 160, 104, 112, 136, 84, 66, 45, 82, 144, 192, 65, 176, 81, 53, 54, 57, 60, 76, 58, 70, 74, 256, 98, 69, 100, 43, 92
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Crossrefs

Inverse: A270194.
Similar permutations: A270199, A270201 (compare the scatter plots).

Formula

a(1) = 1, for n > 1, if A137264(6+n) = 0 [when n is in A269399], a(n) = 1 + 2*a(n-A269362(n)), otherwise a(n) = 2 * a(A269362(n)-1).

A270191 Numbers n for which (prime(n+1)-prime(n)) mod 3 = 1.

Original entry on oeis.org

1, 4, 6, 8, 12, 14, 19, 22, 25, 27, 29, 31, 34, 38, 42, 44, 48, 50, 53, 59, 61, 63, 65, 68, 70, 75, 78, 80, 82, 85, 88, 90, 93, 95, 101, 106, 112, 115, 117, 122, 125, 127, 131, 134, 136, 138, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 163, 169, 172, 175, 177, 181, 183, 189, 191, 193, 198, 204, 207, 211, 213, 217, 222
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Examples

			1 is present as prime(2)-prime(1) = 3-2 = 1 = 1 mod 3.
4 is present as prime(5)-prime(4) = 11-7 = 4 = 1 mod 3.
		

Crossrefs

Subsequence of A270189.
Positions of ones in A137264.

Programs

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

A270192 Numbers n for which (prime(n+1)-prime(n)) mod 3 = 2.

Original entry on oeis.org

2, 3, 5, 7, 10, 13, 17, 20, 24, 26, 28, 30, 33, 35, 41, 43, 45, 49, 52, 57, 60, 62, 64, 66, 69, 72, 77, 79, 81, 83, 87, 89, 92, 94, 98, 104, 109, 113, 116, 120, 124, 126, 128, 132, 135, 137, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 162, 166, 171, 173, 176, 178, 182, 186, 190, 192, 196, 201, 206, 209, 212, 215, 220, 223, 225
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Examples

			2 is present as prime(3) - prime(2) = 5 - 3 = 2 = 2 modulo 3.
24 is present as prime(24) = 89, prime(25) = 97 and 97-89 = 8 = 2 modulo 3.
		

Crossrefs

Subsequence of A270189.
Positions of 2's in A137264.
Differs from its subsequence A029707 for the first time at n=9.

Programs

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