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.

A161888 a(n) = the smallest positive integer that does not divide n, and is such that sum{k=1 to n} a(k) is coprime to n.

This page as a plain text file.
%I A161888 #10 May 26 2015 15:37:42
%S A161888 2,3,2,6,3,7,2,6,4,4,2,8,2,4,4,6,2,4,2,6,4,4,2,14,3,3,4,8,2,4,2,6,2,4,
%T A161888 2,8,2,4,4,6,2,4,2,6,6,4,2,10,2,4,2,6,2,4,3,3,4,4,2,8,2,4,4,6,3,5,2,6,
%U A161888 2,8,2,10,2,4,4,6,3,9,2,6,4,4,2,8,3,3,4,6,2,4,2,6,4,4,3,5,2,4,2,8,2,8,2,6,2
%N A161888 a(n) = the smallest positive integer that does not divide n, and is such that sum{k=1 to n} a(k) is coprime to n.
%C A161888 Sum{k=1 to n} a(k) = A161889(n).
%H A161888 Harvey P. Dale, <a href="/A161888/b161888.txt">Table of n, a(n) for n = 1..1000</a>
%t A161888 spi[{n_,s_,a_}]:=Module[{k=1},While[Divisible[n+1,k]||!CoprimeQ[s+k, n+1], k++];{n+1,s+k,k}]; Transpose[NestList[spi,{1,2,2},105]][[3]] (* _Harvey P. Dale_, May 26 2015 *)
%Y A161888 Cf. A161889
%K A161888 nonn
%O A161888 1,1
%A A161888 _Leroy Quet_, Jun 21 2009
%E A161888 More terms from _Sean A. Irvine_, Aug 10 2010