Skip to main content
5 votes
Accepted

Function with complicated argument constraint with default value

In this case, the first : which is the shorthand of Pattern cannot be omitted (yeah n_ is ...
xzczd's user avatar
  • 66.9k
5 votes
Accepted

How to insert a graphics between two points?

First, remove any paddings and margins from res by setting PlotRangePadding -> None, ImagePadding -> 0. Then specify the ...
Domen's user avatar
  • 26.5k
4 votes

How to find the value of $f(2023) + f(2024)$?

I note and agree with comments. IMHO these questions require some thought rather than blindly using in-built functions and can be approached in a number of ways. I may have made a mistake. If so I'll ...
ubpdqn's user avatar
  • 61.6k
4 votes

How to explain a formula from a generalized hypergeometric function

It looks like ThreeJSymbol in OutputForm. The inputForm used what is called ClebschGordan. ...
Nasser's user avatar
  • 145k
3 votes

How to retrieve the index of a subset in Subsets[list,nspec,{s}]?

You can use Combinatorica Package by evaluating (without "") "<<Combinatorica`". Then use RankKSubset like so: ...
azerbajdzan's user avatar
  • 18.9k
3 votes

How to retrieve the index of a subset in Subsets[list,nspec,{s}]?

Here's an approach. I'm not 100% confident, but it seems to work on the test cases I've tried. Given a subset, we can turn it into a sort of mask that picks out elements from ...
lericr's user avatar
  • 29.2k
2 votes
Accepted

Proper Way to Clear all 'Option' Variables for a Function?

If you're really desperate to do things this way (use symbols as option keys and remove them together with f), you could do this: ...
Sjoerd Smit's user avatar
  • 23.7k
2 votes

How to retrieve the index of a subset in Subsets[list,nspec,{s}]?

Here is a not too clever solution. We may simply check all answers of Subsets[Range[2000], {4}, {i}] for i=1,2,...: ...
Daniel Huber's user avatar
  • 52.7k
2 votes

Automating interesting ways to write 2023

SequenceCases[RealDigits[Glaisher, 10, 111][[1]], {2, 0, 2, 3}] {{2, 0, 2, 3}} ...
eldo's user avatar
  • 75.1k
2 votes

Strange behavior of 'SquareFreeQ'

list = Range[10]; Two positional solutions p = Position[list, _?SquareFreeQ, Heads -> False] {{1}, {2}, {3}, {5}, {6}, {7},...
eldo's user avatar
  • 75.1k
2 votes

Problems with ArcTan making a jump

"Unwrapping" is the term for making the line continuous by implicitly choosing the appropriate branch for each point. (Only possible if you are processing a range of values, e.g. when ...
Jos Bergervoet's user avatar
1 vote

Is it possible to have ToString operate on an expression containing Prefix (@) ? for example exp = [email protected]

The problem here is that notation like f @ x doesn't exist on the expression level; there's no difference between f[x] and ...
Sjoerd Smit's user avatar
  • 23.7k
1 vote

How can I delete duplicates with Abs?

...
eldo's user avatar
  • 75.1k
1 vote

Perform Apply[] to a sum of objects

Using Query Query[{f, g} /* Total] @ a f[a] + g[a]
eldo's user avatar
  • 75.1k

Only top scored, non community-wiki answers of a minimum length are eligible