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.

A089194 Primes p such that p-1 and p+1 are cube- or higher power-free.

This page as a plain text file.
%I A089194 #27 Dec 09 2015 04:06:46
%S A089194 2,3,5,11,13,19,29,37,43,59,61,67,83,101,131,139,149,157,173,179,181,
%T A089194 197,211,227,229,277,283,293,307,317,331,347,349,373,389,397,419,421,
%U A089194 443,461,467,491,509,523,547,557,563,571,587,613,619,643,653,659,661
%N A089194 Primes p such that p-1 and p+1 are cube- or higher power-free.
%C A089194 A212793(a(n) - 1) = A212793(a(n) + 1) = 1. - _Reinhard Zumkeller_, May 27 2012
%H A089194 Reinhard Zumkeller, <a href="/A089194/b089194.txt">Table of n, a(n) for n = 1..10000</a>
%F A089194 {p in A000040: p+1 in A004709 and p-1 in A004709}. - _R. J. Mathar_, Dec 08 2015
%e A089194 43 is included because 43 - 1 = 2 * 3 * 7 and 43 + 1 = 2^2 * 11 are both cubefree.
%e A089194 71 is omitted because the p+1 side, 72 = 2^3 * 3^2, has a cube factor.
%p A089194 isA089194 := proc(n)
%p A089194     if isprime(n) then
%p A089194         isA004709(n-1) and isA004709(n+1) ;
%p A089194     else
%p A089194         false;
%p A089194     end if;
%p A089194 end proc: # _R. J. Mathar_, Dec 08 2015
%t A089194 f[n_]:=Module[{a=m=0},Do[If[FactorInteger[n][[m,2]]>2,a=1],{m,Length[FactorInteger[n]]}];a]; lst={};Do[p=Prime[n];If[f[p-1]==0&&f[p+1]==0,AppendTo[lst,p]],{n,6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jul 15 2009 *)
%t A089194 p3fQ[n_]:=Max[Transpose[FactorInteger[n]][[2]]]<3; Select[Prime[Range[ 200]], AllTrue[#+{1,-1},p3fQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Apr 08 2015 *)
%o A089194 (PARI)
%o A089194 \\ input number of iterations n, power p and the number to subtract k.
%o A089194 powerfreep2(n,p,d) = { c=0; pc=0; forprime(x=2,n, pc++; if(ispowerfree(x-d,p) && ispowerfree(x+d,p), c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }
%o A089194 ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) }
%o A089194 (Haskell)
%o A089194 a089194 n = a089194_list !! (n-1)
%o A089194 a089194_list = filter ((== 1) . a212793 . (+ 1)) a097375_list
%o A089194 -- _Reinhard Zumkeller_, May 27 2012
%Y A089194 Cf. A004709. Subsequence of A089189.
%K A089194 easy,nonn
%O A089194 1,1
%A A089194 _Cino Hilliard_, Dec 08 2003