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.

A059877 Those n for which the absolute value of A059876[n] is prime.

Original entry on oeis.org

1, 3, 4, 5, 6, 10, 11, 12, 13, 15, 16, 17, 18, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 38, 39, 40, 41, 42, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 59, 60, 63, 64, 67, 68, 69, 70, 72, 74, 75, 76, 78, 79, 80, 81, 83, 84, 85, 87, 89, 93, 94, 96, 98, 102, 103, 104, 105, 109, 111
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2001

Keywords

Comments

Of the first 511 terms of A059876, 278 are primes.

Crossrefs

Cf. A059879.

Programs

  • Maple
    positions(true,map(isprime,map(abs, A059876))); # positions function given in A059649.
  • Mathematica
    a[n_] := With[{s = Floor[Log[2, n]]}, (-1)^(n+1) + Sum[(-1)^(Floor[n/2^i] + 1)*Prime[i], {i, 1, s}] + If[1 == n, 1, Mod[s + 1, 2]*Prime[s]]];
    A059877 = Position[Array[a, 120], p_ /; PrimeQ[Abs[p]]] // Flatten (* Jean-François Alcover, Mar 07 2016 *)