Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Mathematica (削除) 82 72 (削除ここまで) 70

Mathematica (削除) 82 72 (削除ここまで) 70

n_~u~k_:=(c=m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

#Mathematica (削除) 82 72 (削除ここまで) 70

n_~u~k_:=(c=m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

Mathematica (削除) 82 72 (削除ここまで) 70

n_~u~k_:=(c=m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

added 1 characters in body
Source Link
DavidC
  • 25.5k
  • 2
  • 53
  • 106

#Mathematica (削除) 82 72 (削除ここまで) 7270

n_~u~k_:=(c=1;m=1;While[mc=m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

#Mathematica (削除) 82 (削除ここまで) 72

n_~u~k_:=(c=1;m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

#Mathematica (削除) 82 72 (削除ここまで) 70

n_~u~k_:=(c=m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

major rewrite
Source Link
DavidC
  • 25.5k
  • 2
  • 53
  • 106

#Mathematica (削除) 82 (削除ここまで) 72

n_~u~k_:=(c=1;m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 50]25]

1
16
96
324
110
1536
24945474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

#Mathematica (削除) 82 (削除ここまで) 72

n_~u~k_:=(c=1;m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[100, 5]
u[1000, 50]

1
16
96
324
1536
2494


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

#Mathematica (削除) 82 (削除ここまで) 72

n_~u~k_:=(c=1;m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

Usage

u[1, 5]
u[5, 2]
u[20, 3]
u[57, 5]
u[66, 13]
u[100, 5]
u[1000, 25]

1
16
96
324
110
1536
5474


Prime factors and their powers are in the center column.

Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid

data

Post Undeleted by DavidC
major rewrite
Source Link
DavidC
  • 25.5k
  • 2
  • 53
  • 106
Loading
Post Deleted by DavidC
example and shorter approach.
Source Link
DavidC
  • 25.5k
  • 2
  • 53
  • 106
Loading
Source Link
DavidC
  • 25.5k
  • 2
  • 53
  • 106
Loading

AltStyle によって変換されたページ (->オリジナル) /