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.

A132850 a(0)=1; a(n) = the smallest prime dividing (n+a(n-1)), for n>=1.

This page as a plain text file.
%I A132850 #11 Sep 16 2015 13:59:24
%S A132850 1,2,2,5,3,2,2,3,11,2,2,13,5,2,2,17,3,2,2,3,23,2,2,5,29,2,2,29,3,2,2,
%T A132850 3,5,2,2,37,73,2,2,41,3,2,2,3,47,2,2,7,5,2,2,53,3,2,2,3,59,2,2,61,11,
%U A132850 2,2,5,3,2,2,3,71,2,2,73,5,2,2,7,83,2,2,3,83,2,2,5,89,2,2,89,3,2,2,3,5,2,2
%N A132850 a(0)=1; a(n) = the smallest prime dividing (n+a(n-1)), for n>=1.
%C A132850 a(4n+1) = a(4n+2) = 2, for all n >= 0. a(4n) and a(4n+3) are odd primes, for all n >= 0.
%H A132850 Harvey P. Dale, <a href="/A132850/b132850.txt">Table of n, a(n) for n = 0..1000</a>
%e A132850 a(8) + 9 = 11 + 9 = 20. The smallest prime divisor of 20 is 2. So a(9) = 2.
%t A132850 a = {1}; Do[AppendTo[a, FactorInteger[n + a[[ -1]]][[1, 1]]], {n, 1, 100}]; a (* _Stefan Steinerberger_, Nov 25 2007 *)
%t A132850 nxt[{n_,a_}]:={n+1,FactorInteger[n+1+a][[1,1]]}; Transpose[NestList[nxt,{0,1},100]][[2]] (* _Harvey P. Dale_, Jan 21 2015 *)
%Y A132850 Cf. A076561.
%K A132850 nonn
%O A132850 0,2
%A A132850 _Leroy Quet_, Nov 21 2007
%E A132850 More terms from _Stefan Steinerberger_, Nov 25 2007