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.

This page as a plain text file.
%I A059877 #6 Mar 07 2016 02:58:40
%S A059877 1,3,4,5,6,10,11,12,13,15,16,17,18,21,22,24,26,27,28,30,32,33,34,38,
%T A059877 39,40,41,42,45,46,48,50,51,52,54,55,56,57,59,60,63,64,67,68,69,70,72,
%U A059877 74,75,76,78,79,80,81,83,84,85,87,89,93,94,96,98,102,103,104,105,109,111
%N A059877 Those n for which the absolute value of A059876[n] is prime.
%C A059877 Of the first 511 terms of A059876, 278 are primes.
%p A059877 positions(true,map(isprime,map(abs, A059876))); # positions function given in A059649.
%t A059877 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]]];
%t A059877 A059877 = Position[Array[a, 120], p_ /; PrimeQ[Abs[p]]] // Flatten (* _Jean-François Alcover_, Mar 07 2016 *)
%Y A059877 Cf. A059879.
%K A059877 nonn
%O A059877 1,2
%A A059877 _Antti Karttunen_, Feb 05 2001