# Questions tagged [integer-sequence]

The tag has no usage guidance.

69 questions
2k views

### Is it possible to invoke the OEIS from Mathematica?

I had always wondered if there might be a way to write a function, which I'll call OEISData[], that more or less works as a curated data function for The On-Line ...
559 views

### Speeding up the built-in Rudin-Shapiro and Thue-Morse sequence functions

Version 10.2 introduced two well-studied sequences as functions: the (Golay-)Rudin-Shapiro sequence (RudinShapiro[]) and the (Prouhet-)Thue-Morse sequence (...
823 views

### Partitioning a number into consecutive integers

Consider n=45; then $$1+2+3+4+5+6+7+8+9=45$$ $$5+6+7+8+9+10=45$$ $$7+8+9+10+11=45$$ $$14+15+16=45$$ $$22+23=45$$ Question: how to find all representations of a ...
5k views

### Fibonacci Sequence Generator

I'm trying to write a function in Workbench which will generate a Fibonacci sequence starting with F0 = 0 and F1 = 1. So far I ...
2k views

### How to implement recursive function

I'm trying to do the following (taken from an answer by Watson to my question on Math SE): Start with $x_1=2$, say. Then define $$x_{n+1} = |\{i \in \{1,\dots,n-1\} \;:\; x_i=x_n\}|$$ i.e. number ...
4k views

385 views

### splitting integer problem

I want to cut the integer into small numbers and show me all the possibilities. For example, if I choose integer 6, then I would like to know how many combination of a 5 dimensional vector (or table ?)...
191 views

### Building a sequence of the digits of π

Just for fun, I'm trying to write up some code that will list a finite number of the digits of pi, i.e. {3,1,4,1,5,...,#}. I have the general pattern, but for some ...
85 views

### Producing a particular sequence of integers recursively [closed]

I am supposed to write a function which computes the next integer in a sequence from the given one. For example: nextval[57] should give mm ...
117 views

### Constructing the following figure using mathematica

How do I construct the figure in the image using the formulae in Mathematica? I defined the following functions for the 4 cases. Can you also explain the significance of these in relation to the ...
113 views

### efficiently method for generating a sequence

The sequence is defined as $a(1)=1,a(n)=a(n-1)+a\left(\left\lfloor \log _2(n)\right\rfloor \right)$ A natural way do this is ...
142 views

### Finding the largest palindrome which is the product of two 2-digit numbers

My goal is to find the largest palindrome which is the product of two 2-digit numbers using the following program. I want the program to add each palindrome it finds, to the list H. I also want it to ...
96 views

### FindInstance skips solutions

I have an equation to compute the bit-error rate of a binary symmetric channel: $$P_{err}(n,p) = \sum_{k = \frac{n-1}{2} + 1}^n\binom n k p^k(1-p)^{n-k}$$ I then want to find the smallest $n$-...
85 views

### Mathematica analog to Wolfram|Alpha dataset analysis [on hold]

I have a set of sequences with length 8,48,480,5760,.. and would like to do sequence analysis on them. I plugged the length 8 sequence into wolframalpha: https://www.wolframalpha.com/input/?i=11,+2,+...