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.

A162870 Primes p such that p-1 and p+1 each contain at least one cubed prime in their prime factorization.

This page as a plain text file.
%I A162870 #14 Dec 08 2015 13:42:31
%S A162870 919,1999,2647,2663,2969,3511,3833,3943,4751,6857,9127,10313,11287,
%T A162870 11719,12041,12583,13033,13337,13879,14249,14633,15497,15607,16903,
%U A162870 18089,18199,18251,18521,19751,20249,20359,20681,21751,21977,22409
%N A162870 Primes p such that p-1 and p+1 each contain at least one cubed prime in their prime factorization.
%C A162870 The selection criterion is that p-1 and p+1 are in the subsequence 8=2^3, 24=2^3*3, 27=3^3, 40=2^3*5, 54=2*3^3,... of cubeful numbers (A046099) which actually display at least one cube in their standard prime factorization (A176297).
%C A162870 So at least one of the e_i in p-1=product p_i^e_i, and at least one of the e_j in p+1=product p_j^e_j must equal 3. This is more restrictive than being cubeful, so the sequence becomes a subsequence of A086708.
%H A162870 Robert Israel, <a href="/A162870/b162870.txt">Table of n, a(n) for n = 1..10000</a>
%e A162870 271 is not in the sequence although 271 - 1 = 2*3^3*5 contains a third cube in the prime factorization, because 271 + 1 = 2^4*17 does not.
%e A162870 919 is in the sequence because 919 - 1 = 2*3^3*17 contains a third cube in the prime factorization and so does 919 + 1 = 2^3*5*23.
%p A162870 isA162870 := proc(n)
%p A162870     if isprime(n) then
%p A162870         isA176297(n-1) and isA176297(n+1) ;
%p A162870     else
%p A162870         false;
%p A162870     end if;
%p A162870 end proc:
%p A162870 for n from 1 to 40000 do
%p A162870     if isA162870(n) then
%p A162870         printf("%d,",n) ;
%p A162870     end if;
%p A162870 end do: # _R. J. Mathar_, Dec 08 2015
%p A162870 N:= 10^6: # to get all terms < N, where N is even
%p A162870 V:= Vector(N/2):
%p A162870 for i from 1 do
%p A162870   p:= ithprime(i);
%p A162870   if p^3 > N+1 then break fi;
%p A162870   if p = 2 then inds:= 4*[seq(i,i=1..floor(N/8),2)]
%p A162870   else inds:= p^3*select(t -> t mod p <> 0, [$1..floor(N/2/p^3)])
%p A162870   fi;
%p A162870   V[inds]:= 1;
%p A162870 od:
%p A162870 select(t -> V[(t-1)/2] = 1 and V[(t+1)/2] = 1 and isprime(t), [seq(t,t=3..N,2)]); # _Robert Israel_, Dec 08 2015
%t A162870 f[n_]:=Module[{a=m=0},Do[If[FactorInteger[n][[m,2]]==3,a=1],{m,Length[FactorInteger[n]]}]; a]; lst={};Do[p=Prime[n];If[f[p-1]==1&&f[p+1]==1,AppendTo[lst,p]], {n,7!}];lst
%Y A162870 Cf. A089189, A089194.
%K A162870 nonn
%O A162870 1,1
%A A162870 _Vladimir Joseph Stephan Orlovsky_, Jul 15 2009
%E A162870 Role of cubefree numbers clarified by _R. J. Mathar_, Jul 31 2007