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.

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}]

A233809 a(n) = Sum_{k=1..n} prime(k) * s(k), where s(k) = (-1)^(floor(k/2)).

Original entry on oeis.org

2, -1, -6, 1, 12, -1, -18, 1, 24, -5, -36, 1, 42, -1, -48, 5, 64, 3, -64, 7, 80, 1, -82, 7, 104, 3, -100, 7, 116, 3, -124, 7, 144, 5, -144, 7, 164, 1, -166, 7, 186, 5, -186, 7, 204, 5, -206, 17, 244, 15, -218, 21, 262, 11, -246, 17, 286, 15, -262
Offset: 1

Views

Author

Jon Perry, Dec 16 2013

Keywords

Comments

s(k) starts +1, -1, -1, +1, +1, -1, -1, ...

Examples

			a(6) = +2 - 3 - 5 + 7 + 11 - 13 = -1.
		

Crossrefs

Cf. A130642 (a(n) = -1), A130643 (a(n) = 1). - Michel Marcus, Aug 06 2017

Programs

  • Magma
    [&+[NthPrime(k)*(-1)^(Floor(k/2)): k in [1..n]]: n in [1..60]]; // Vincenzo Librandi, Aug 07 2017
  • Mathematica
    f[n_] := Sum[(-1)^Floor[k/2]*Prime[k], {k, n}]; Array[f, 60] (* Robert G. Wilson v, Aug 06 2017 *)
  • PARI
    s(k) = (-1)^(floor(k/2));
    a(n) = sum(k=1,n,s(k)*prime(k));
    \\ Joerg Arndt, Aug 06 2017
    

Extensions

Name corrected by Joerg Arndt, Aug 06 2017

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

Original entry on oeis.org

10, 14, 18, 4290, 4392, 4434, 4440, 4456, 4480, 48596, 48620, 48744, 49540, 49544, 49722, 55058, 55078, 55200, 56466, 56474, 60110, 60128, 60462, 60750, 61328, 61486, 62114, 62758, 62770, 62974, 62992, 63022, 63076, 63094, 63272, 63802
Offset: 1

Views

Author

Manuel Valdivia, Oct 03 2007

Keywords

Comments

Or, with A065091(odd primes), numbers n such that S(n) = 0, where S(n) = (S(n-1) + A065091(n))*(-1)^n; S(0)=0, n >= 1.

Examples

			S(9) = (..((0+3)*-1)+5)*1)+7)*-1)+11)*1)+13)*-1)+17)*1)+19)*-1)+23)*1)+29)*-1 = -31, S(10)=(-31 + 31)*1 = 0, hence 10 is a term.
S(13) = (..((0+3)*-1)+5)*1)+7)*-1)+11)*1)+13)*-1)+17)*1)+19)*-1)+23)*1)+29)*-1)+31)*1)+37)*-1)+41)*1)+43)*-1 = -47, S(14)=(-47 + 47)*1 = 0, hence 14 is a term.
		

Crossrefs

Programs

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