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.

A377311 Least positive integer k with k*n primitive practical.

Original entry on oeis.org

1, 1, 2, 5, 4, 1, 4, 11, 34, 2, 6, 17, 6, 2, 2, 17, 12, 17, 12, 1, 2, 3, 12, 31, 188, 3, 82, 1, 12, 1, 16, 37, 2, 6, 4, 41, 18, 6, 2, 47, 20, 1, 20, 2, 158, 6, 24, 67, 236, 94, 4, 2, 24, 41, 4, 59, 4, 6, 24, 79, 24, 8, 202, 67, 4, 1, 30, 3, 4, 2, 30, 97, 30, 9, 158, 3, 4, 1, 36, 97, 254, 10, 36, 101, 4, 10, 4, 1, 36, 79, 4, 3, 6, 12, 4, 127, 42, 118, 298, 47
Offset: 1

Views

Author

Frank M Jackson, Oct 24 2024

Keywords

Examples

			a(9) = 34. Consider the following sequence of 16 even multiples of 9 namely (18, 36, 54, . . . , 288, 306), all are practical numbers but only 9*34 = 306 is a primitive practical number. This is because 306 when divided by 3 is no longer practical whereas the other 15 even multiples remain practical when divided by 3.
		

Crossrefs

Programs

  • Mathematica
    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]]];
    DivFreeQ[n_] := Module[{plst=First/@Select[FactorInteger[n],#[[2]]>1&],m,ok=False},Do[If[!PracticalQ[n/plst[[m]]],ok=True,ok=False; Break[]],{m,1,Length@plst}]; ok];
    PPracticalQ[n_] := PracticalQ[n]&&(SquareFreeQ[n]||DivFreeQ[n]);
    lst={}; Do[m=1; While[!PPracticalQ[n*m],m++]; AppendTo[lst,m],{n,1,100}]; lst