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.

A080112 Positions of A080114 in A000040.

This page as a plain text file.
%I A080112 #12 Sep 20 2022 08:38:36
%S A080112 2,3,4,5,6,9,11,12,15,17,20,22,23,27,32,36,39,43,46,52,54,56,58,64,72,
%T A080112 76,81,83,85,92,96,103,109,111,118,120,128,132,133,146,150,154,156,
%U A080112 157,164,166,167,173,175,179,182,185,190,200,202,207,215,222,225,228,229
%N A080112 Positions of A080114 in A000040.
%p A080112 A080112 := proc(n) option remember; local i; if(1 = n) then RETURN(2); fi; i := A080112(n-1)+1; while(i > 0) do if(A080110(i) > 0) then RETURN(i); fi; i := i+1; od; end;
%t A080112 s[p_, u_] := Sum[JacobiSymbol[j, p], {j, 1, u}]; Select[Range[2, 300], (p = Prime[#]; AllTrue[Range[(p - 1)/2], s[p, #] >= 0 &]) &] (* _Jean-François Alcover_, Mar 07 2016 *)
%o A080112 (Sage)
%o A080112 @CachedFunction
%o A080112 def A080112(n) :
%o A080112      if 1 == n : return 2
%o A080112      i = A080112(n-1) + 1
%o A080112      while i > 0 :
%o A080112          if A080110(i) > 0 : return i
%o A080112          i += 1
%o A080112 [A080112(n) for n in (1..61)] # _Peter Luschny_, Aug 09 2012
%Y A080112 Complement of A080113. Characteristic function: A080110.
%K A080112 nonn
%O A080112 1,1
%A A080112 _Antti Karttunen_, Feb 11 2003