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

A215035 Numbers n such that A215029(n) = 2.

Original entry on oeis.org

2, 9, 15, 21, 31, 41, 47, 57, 63, 67, 81, 91, 95, 103, 115, 119, 123, 127, 135, 141, 145, 149, 155, 165, 175, 179, 185, 189, 195, 201, 205, 209, 225, 231, 241, 255, 265, 269, 275, 283, 297, 301, 305, 313, 321, 325, 329, 339, 343, 347, 353, 363, 367, 377, 385, 389, 401, 413, 417, 423, 427, 431, 437, 445, 449, 461, 467, 483, 487, 495, 499, 507, 523, 545, 559, 563
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Crossrefs

A215031 is a subsequence. Cf. A215029-A215035.

A214912 Primes p such that A215029(p) = 0.

Original entry on oeis.org

5, 11, 17, 23, 59, 73, 83, 97, 109, 137, 157, 167, 191, 197, 211, 227, 233, 257, 277, 307, 331, 379, 419, 439, 509, 547, 571, 599, 643, 661, 677, 691, 709, 727, 797, 823, 853, 877, 947, 977, 991, 1009, 1031, 1051, 1087, 1103, 1117, 1153, 1171, 1229, 1259, 1289, 1303, 1319, 1367, 1381, 1453, 1471, 1489, 1597, 1621, 1663, 1709, 1753, 1867, 1879, 1901, 1933
Offset: 1

Views

Author

N.Harishankar, Jul 29 2012

Keywords

Comments

If p is in this sequence then p is a linear combination of all smaller primes taken with coefficients either 1 or -1. (The converse is not true.)

Examples

			5=3+2 is a member, so is 11=7+5-3+2.
		

Crossrefs

Extensions

Edited and extended by N. J. A. Sloane, Aug 05 2012

A215030 a(n) = A215029(A000040(n)), where A000040(n) is the n-th prime.

Original entry on oeis.org

2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Comments

For primes whose value is 0, see A214912; for value 1 see A031215; and for value 2 see A215031.

Crossrefs

Programs

  • PARI
    A215029(n) = if(n<=2,n,my(mp=precprime(n-1),d=n); while(mp>0, if(d>0, d -= mp, d += mp); mp = precprime(mp-1)); (d));
    A215030(n) = A215029(prime(n)); \\ Antti Karttunen, Nov 28 2018

A215031 Primes p such that A215029(p) = 2.

Original entry on oeis.org

2, 31, 41, 47, 67, 103, 127, 149, 179, 241, 269, 283, 313, 347, 353, 367, 389, 401, 431, 449, 461, 467, 487, 499, 523, 563, 587, 607, 617, 631, 653, 739, 751, 761, 773, 811, 829, 859, 883, 907, 919, 937, 967, 1019, 1039, 1063, 1093, 1129, 1187, 1201, 1217, 1237, 1279, 1297, 1327, 1409, 1427, 1433, 1447, 1483, 1499, 1523, 1543, 1553, 1567, 1579, 1607, 1613, 1637
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Crossrefs

A215032 Numbers n such that A215029(n) = -1.

Original entry on oeis.org

4, 10, 16, 22, 38, 44, 54, 58, 64, 72, 82, 92, 96, 108, 116, 120, 124, 132, 136, 142, 146, 152, 156, 166, 176, 182, 186, 190, 196, 202, 206, 210, 226, 232, 252, 256, 266, 272, 276, 294, 298, 302, 306, 318, 322, 326, 330, 340, 344, 350, 360, 364, 374, 378, 386, 398, 410, 414, 418, 424, 428, 434, 438, 446, 458, 464, 480, 484, 492, 496, 504, 508, 542, 546, 560
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Comments

All terms are composite.

Crossrefs

A215033 Numbers n such that A215029(n) = 0.

Original entry on oeis.org

0, 5, 6, 11, 12, 17, 18, 23, 24, 26, 28, 32, 34, 36, 39, 42, 45, 48, 50, 52, 55, 59, 60, 65, 68, 70, 73, 74, 76, 78, 83, 84, 86, 88, 93, 97, 98, 100, 104, 106, 109, 110, 112, 117, 121, 125, 128, 130, 133, 137, 138, 143, 147, 150, 153, 157, 158, 160, 162, 167, 168, 170, 172, 177, 180, 183, 187, 191, 192, 197, 198, 203, 207, 211, 212, 214, 216, 218, 220, 222, 227
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Crossrefs

Cf. A215029-A215035. A214912 is a subsequence.

A215034 Numbers n such that A215029(n) = 1.

Original entry on oeis.org

1, 3, 7, 8, 13, 14, 19, 20, 25, 27, 29, 30, 33, 35, 37, 40, 43, 46, 49, 51, 53, 56, 61, 62, 66, 69, 71, 75, 77, 79, 80, 85, 87, 89, 90, 94, 99, 101, 102, 105, 107, 111, 113, 114, 118, 122, 126, 129, 131, 134, 139, 140, 144, 148, 151, 154, 159, 161, 163, 164, 169, 171, 173, 174, 178, 181, 184, 188, 193, 194, 199, 200, 204, 208, 213, 215, 217, 219, 221, 223, 224
Offset: 1

Views

Author

N. J. A. Sloane, Aug 05 2012

Keywords

Crossrefs

Cf. A215029-A215035. A031215 is a subsequence.

A215036 2 followed by "1,0" repeated.

Original entry on oeis.org

2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

N. J. A. Sloane, Aug 06 2012

Keywords

Comments

Take the first n primes and combine them with coefficients +1 and -1; then a(n) is the smallest number (in absolute value) that can be obtained.
For example, a(1) = 2, a(2) = 1 from 3-2 = 1; a(3) = 0 from -2-3+5 = 0; a(11) = 0 from 2-3-5-7+11-13+17+19-23-29+31 = 0.
Comment from Franklin T. Adams-Watters, Aug 05 2012: Sketch of proof that the above sum of primes results in this sequence. If S_n is the set of possible values of the signed sums for the first n primes, then S_{n+1} = S_n U (S_n + prime(n+1)) U (S_n - prime(n+1)). Beyond about n=4, this will be everything even or everything odd in an interval around zero, and then a fringe on either side; the size of the interval will be 2 * A007504(n) - k for some small k. Recursively, since prime(n) << A007504(n), this will continue to hold. Hence the sequence continues to alternate 0's and 1's. A quite modest estimate on the distribution of primes suffices to complete the proof.
For number of solutions see A022894, A113040; also A083309.

Crossrefs

Essentially the same as A135528, A059841, A000035.

Programs

Showing 1-8 of 8 results.