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.

A100821 a(n) = 1 if prime(n) + 2 = prime(n+1), otherwise 0.

This page as a plain text file.
%I A100821 #8 Nov 01 2019 16:43:31
%S A100821 0,1,1,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,
%T A100821 1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,
%U A100821 1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0
%N A100821 a(n) = 1 if prime(n) + 2 = prime(n+1), otherwise 0.
%C A100821 Same as A062301 except for starting point.
%C A100821 a(n)=1 iff prime(n) is the smaller of a pair of twin primes, else a(n)=0. This sequence can be derived from the sequence b(n)=1 iff n and n+2 are both prime, else b(n)=0. This latter sequence has as its inverse Moebius transform the sequence c(n) = the number of distinct factors of n which are the smaller of a pair of twin primes. For example, c(15)=2 because 15 is divisible by 3 and 5, each of which is the smaller of a pair of twin primes. - _Jonathan Vos Post_, Jan 07 2005
%F A100821 a(n) = A062301(n+1) = 1 - A100810(n).
%t A100821 Table[If[Prime[n] + 2 == Prime[n + 1], 1, 0], {n, 120}] (* _Ray Chandler_, Jan 09 2005 *)
%K A100821 easy,nonn
%O A100821 1,1
%A A100821 _Giovanni Teofilatto_, Jan 06 2005
%E A100821 Corrected and extended by _Ray Chandler_, Jan 09 2005