Skip to main content

Questions tagged [integer-sequence]

4 votes
1 answer
125 views

I want to turn finite integer sequences, or a finite subset, into an elastic bracelet. Below I have answer for how to do this that took me a while to think of how to do. It still isn't perfect as the ...
4 votes
2 answers
162 views

Problem statement: I am trying to write a function that calculates the number of distinct ways an integer can be expressed as a sum of nonnegative integer powers of its decimal digits and return this ...
3 votes
2 answers
297 views

Given a number, I am trying to find the longest streak of positive divisibility into sequential smaller numbers. Here's an example: We have this 2D list: ...
1 vote
2 answers
227 views

Here is, I think, a relatively simple code to generate a recursive sequence, but it takes Mathematica forever to generate those tables. I can understand maybe why it takes so long to generate the ...
9 votes
7 answers
499 views

Given a list of integers like this: z = {113, 117, 118, 119, 120, 121, 475, 476, 529, 538, 542, 543, 544} I want a function that returns: ...
10 votes
8 answers
1k views

I need a list of integers to check if a variable has one of the values of the list. If[ MemberQ[List,x], Green, Red] The list contains integers and is characterized ...
7 votes
4 answers
211 views

I have an ordered list of integers, i.e.: list = {1,3,5,6,8,10,12,15}; and I want to know if there is a fast way to get a list of the integers that do not appear ...
5 votes
6 answers
716 views

I want to show that "Out of the first 450 Fibonacci numbers, the odd number is twice as many as even number." with Mathematica. Can you solve it please?
3 votes
6 answers
483 views

(this question was modified after initial answers) For a sequence x = {6,4,2,4,2,4,6} y = Subsequences[x] gives the list of ...
6 votes
3 answers
146 views

Given positive integers $k,n$, a $k$-sequence of $I_n$ is a list of $k$ not necessarily distinct elements of $\{1,\dots, n\}$. And an $n$-sharing of $I_k$ is a list of $n$ possibly empty, disjoint ...
2 votes
1 answer
278 views

Consider a sequence starting with 2, subtract 2 to get the next term, now add 3 to get the next term and so on according to the rule (-2,+3) consecutively which starts like ...
2 votes
2 answers
166 views

Suppose I know the sequence is of the $a n^4 + b n^3 + c n^2 + d n$, with positive integers $a,b,c,d$, what is the easiest way to get them from the first few coefficients? Here are the sequences I'm ...
20 votes
6 answers
1k views

I want to find the peaks, plateaus and ledges of an integer sequence, but all my attempts failed. 1. Example list ...

15 30 50 per page
1
2 3 4 5
8