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.

A187930 Least number r such that r == k-1 (mod prime(k)) for k = 1..n.

This page as a plain text file.
%I A187930 #9 Mar 24 2018 14:49:30
%S A187930 0,4,22,52,1522,29242,299512,4383592,188677702,5765999452,5765999452,
%T A187930 2211931390882,165468170356702,8075975022064162,361310530977154972,
%U A187930 20037783573808880092,1779852341342071295512,40235059344426324076912,4966347076439519105374252,169991099649125127278835142
%N A187930 Least number r such that r == k-1 (mod prime(k)) for k = 1..n.
%H A187930 Harvey P. Dale, <a href="/A187930/b187930.txt">Table of n, a(n) for n = 1..350</a>
%F A187930 a(n) = A053664(n) - 1.
%e A187930 a(4) = 1522 because :
%e A187930 1522 == 0 (mod 2) ;
%e A187930 1522 == 1 (mod 3);
%e A187930 1522 == 2 (mod 5);
%e A187930 1522 == 3 (mod 7);
%e A187930 1522 == 4 (mod 11).
%p A187930 with(numtheory):nn:=100:T:=array(1..nn):pr:=1:for k from 1 to nn do: pr:=pr*ithprime(k):T[k]:=pr:od:for  m from 1 to nn do:z:=T[m]:pp:=ithprime(m):id:=0:for x from 0 to z-1 while (id=0)  do:it:=0:for y from 0 to m-1 do:r:=ithprime(y+1):a:=irem(x,r):if a=y then it:=it+1:else
%p A187930   fi: od:if it =m then id:=1:print(x):else fi:od:od:
%t A187930 Table[ChineseRemainder[Range[n] - 1, Prime[Range[n]]], {n, 20}]
%Y A187930 Cf. A070198.
%K A187930 nonn
%O A187930 1,2
%A A187930 _Michel Lagneau_, Mar 16 2011