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.

A260698 Practical numbers of the form p - 1 where p is a prime.

This page as a plain text file.
%I A260698 #19 Dec 01 2015 15:42:02
%S A260698 1,2,4,6,12,16,18,28,30,36,40,42,60,66,72,78,88,96,100,108,112,126,
%T A260698 150,156,162,180,192,196,198,210,228,240,256,270,276,280,306,312,330,
%U A260698 336,348,352,378,396,400,408,420,432,448,456,460,462,486,520,522,540,546
%N A260698 Practical numbers of the form p - 1 where p is a prime.
%C A260698 Intersection of A005153 and A006093. - _Michel Marcus_, Nov 16 2015
%e A260698 a(5)=12 as 12 is a practical number and 12+1=13 is prime. It is the 5th such practical number.
%t A260698 PracticalQ[n_] := Module[{f, p, e, prod = 1, ok = True}, If[n<1||(n>1&&OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e}=Transpose[f]; Do[If[p[[i]]>1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]]; Select[Table[Prime[n]-1, {n, 1, 200}], PracticalQ] (* using _T. D. Noe_'s program A005153 *)
%o A260698 (PARI) is(n) = bittest(n, 0) && return(n==1); my(P=1); n && !for(i=2, #n=factor(n)~, n[1, i]>1+(P*=sigma(n[1, i-1]^n[2, i-1])) && return);
%o A260698 forprime(p=2, 1000, if(is(p-1), print1(p-1", "))) \\ _Altug Alkan_, Nov 16 2015
%Y A260698 Cf. A005153, A006093, A225223.
%K A260698 nonn
%O A260698 1,2
%A A260698 _Frank M Jackson_, Nov 16 2015