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.

A128039 Numbers n such that 1 - Sum_{k=1..n-1} A001223(k)*(-1)^k = 0.

Original entry on oeis.org

3, 6, 10, 13, 18, 26, 29, 218, 220, 223, 491, 535, 538, 622, 628, 3121, 3126, 3148, 3150, 3155, 3159, 4348, 4436, 4440, 4444, 4458, 4476, 4485, 4506, 4556, 4608, 4611, 4761, 5066, 5783, 5788, 12528, 1061290, 2785126, 2785691, 2867466, 2867469, 2872437
Offset: 1

Views

Author

Manuel Valdivia, May 07 2007

Keywords

Comments

Sequence has 294 terms < 10^7. If n is in this sequence then prime(n) = abs(3 + 2*Sum_{k=1..n-1} prime(k)*(-1)^k).

Examples

			1 - ( -A001223(1) + A001223(2)) = 1-(-1+2) = 0, hence 3 is a term.
1 - ( -A001223(1) + A001223(2) - A001223(3) + A001223(4) - A001223(5)) = 1-(-1+2-2+4-2) = 0, hence 6 is a term.
		

Crossrefs

Cf. A127596, A001223 (differences between consecutive primes), A000101 (increasing gaps between primes, upper end), A002386 (increasing gaps between primes, lower end), A066033.

Programs

  • Mathematica
    S=0; a=0; Do[S=S+((Prime[k+1]-Prime[k])*(-1)^k); If[1-S==0, a++; Print[a," ",k+1]], {k, 1, 10^7, 1}]

A131196 Numbers n such that 1 + S(n) = 0, where S(n) = (S(n-1) + A000040(n))*(-1)^n; S(0)=0, n=>1.

Original entry on oeis.org

22, 38, 200, 302, 468, 560, 1186, 1208, 2006, 2026, 2106, 23698, 23716, 25968, 25990, 26706, 48316, 311888, 311914, 311938, 313866, 331540, 332002, 377102, 377634, 377670, 377748, 378428, 378452, 378996, 379026, 379090, 387618, 388140, 389398
Offset: 1

Views

Author

Manuel Valdivia, Sep 26 2007

Keywords

Comments

The terms are equal to A130642 for n/2 even (70 terms) and to A130643 for n/2 odd (91 terms).

Examples

			S(21)=(..((((0+2)*-1)+3)*1)+5)*-1)+7)*1)+11)*- 1)+13)*1)+...+71)*1)+73)*-1 = -80, 1 + S(22) =1 + (-80 + 79)*1 = 0, hence 22 is a term.
S(37)=(..((((0+2)*-1)+3)*1)+5)*-1)+7)*1)+11)*- 1)+13)*1)+...+151)*1)+157)*-1 = -164, 1 + S(38) =1 + (-164 + 163)*1 = 0, hence 38 is a term.
		

Crossrefs

Programs

  • Mathematica
    S=0;a=0; Do[S=(S+Prime[n])*(-1)^n; If[1+S==0,a++; Print[a," ",n]], {n, 1, 10^8, 1}]

A131197 Numbers n such that 1 - S(n) = 0, where S(n) = (S(n-1) + A000040(n))*(-1)^n; S(0)=0, n=>1.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 190, 194, 306, 308, 462, 464, 472, 474, 476, 478, 490, 1884, 1890, 1938, 23636, 23656, 23850, 25226, 25834, 25984, 26642, 26650, 26924, 26998, 27000, 311922, 313880, 313946, 331676, 331762, 331782, 332676, 377078, 377518, 377666
Offset: 1

Views

Author

Manuel Valdivia, Sep 26 2007

Keywords

Comments

The terms are equal to A130642 for n/2 odd (100 terms) and to A130643 for n/2 even (86 terms).

Examples

			S(11)=(..((((0+2)*-1)+3)*1)+5)*-1)+7)*1)+11)*- 1)+13)*1)+...+29)*1)+31)*-1 = -36, 1 - S(12)=1 - (-36 + 37)*1 = 0, hence 12 is a term.
S(13)=(..((((0+2)*-1)+3)*1)+5)*-1)+7)*1)+11)*- 1)+13)*1)+...+37)*1)+41)*-1 = -42, 1 - S(14)=1 - (-42 + 43)*1 = 0, hence 14 is a term.
		

Crossrefs

Programs

  • Mathematica
    S=0;a=0; Do[S=(S+Prime[n])*(-1)^n; If[1-S==0,a++; Print[a," ",n]], {n, 1, 10^8, 1}]

A131694 Numbers k such that abs(S(k)) = A008347(k) is prime, where S(k) = S(k-1) + A000040(k)*(-1)^k; S(0) = 0.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 18, 28, 32, 38, 42, 46, 50, 52, 54, 64, 68, 70, 72, 74, 76, 86, 88, 98, 100, 110, 126, 128, 130, 140, 146, 152, 162, 192, 202, 214, 226, 242, 252, 258, 264, 270, 290, 294, 304, 308, 314, 316, 320, 322, 332, 342, 348, 352, 358, 360
Offset: 1

Views

Author

Manuel Valdivia, Oct 03 2007

Keywords

Comments

The sequence include as first term the only case where S(k) = -1 times a prime: S(1) = -2.

Examples

			S(3) = ((0+2*-1)+3*1)+5*-1 = -4, S(4) = -4 + 7*1 = 3 is prime, hence 4 is a term.
S(5) = ((((0+2*-1)+3*1)+5*-1)+7*1)+11*-1 = -8, S(6) = -8 + 13*1 = 5 is prime, hence 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    S=0; Do[S=S+Prime[n]*(-1)^n; If[PrimeQ[S]==True, Print[n]], {n, 1, 10^3, 1}]
Showing 1-4 of 4 results.