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.

A155882 Smallest positive prime number such that a(n)-2n is also prime, a(n) < a(n+1), and the differences a(n)-2n must increase with n.

This page as a plain text file.
%I A155882 #7 Feb 06 2013 21:57:06
%S A155882 5,11,17,31,41,53,61,83,89,103,131,137,157,167,179,199,227,233,271,
%T A155882 281,293,307,317,331,367,383,401,409,431,439,463,503,509,547,557,563,
%U A155882 577,599,619,643,653,661,673,701,709,733,821,829,859,887,911,967,983,991
%N A155882 Smallest positive prime number such that a(n)-2n is also prime, a(n) < a(n+1), and the differences a(n)-2n must increase with n.
%C A155882 Subtracting from a(1) twice n=1 gives 5-2=3, which is a prime number; subtracting from a(2) twice n=2 gives 11-4=7, which is a prime number; subtracting from a(3) twice n=3 gives 17-6=11, which is a prime number; subtracting from a(4) twice n=4 gives 31-8=23, which is a prime number; etc.
%H A155882 Alois P. Heinz, <a href="/A155882/b155882.txt">Table of n, a(n) for n = 1..1000</a>
%p A155882 b:= proc(n) option remember; global a; a(n); b(n) end: a:= proc(n) option remember; local m; global b; if n=1 then b(1):= 3; 5 else for m from a(n-1)+2 by 2 while not (isprime(m) and (b(n-1)<m-2*n) and isprime (m-2*n)) do od; b(n):= m-2*n; m fi end: seq (a(n), n=1..100);  # _Alois P. Heinz_, Feb 05 2009
%Y A155882 Cf. A020484, A108184 (for the differences a(n)-2n).
%K A155882 base,easy,nonn
%O A155882 1,1
%A A155882 _Eric Angelini_, Jan 29 2009
%E A155882 Corrected definition and more terms from _Alois P. Heinz_, Feb 05 2009