This site is supported by donations to The OEIS Foundation.

# User:Michael B. Porter

Hello!

I am a resident of Huntington Beach, California, and a Ph.D. student at the University of California, Irvine. I was an electrical engineer for 25 years before I decided to go back to school. I am working towards becoming a math professor.

## Contents

# Questions

If you know the answer to any of these, please post to my user talk page or you can e-mail me at michael(underscore)b(underscore)porter(at)yahoo(dot)com. Thank you.

- Does PARI's znprimroot() function always return the smallest primitive root (mod n)?

- Joerg Arndt reports the following: Indeed it does, but that is not documented and so not guaranteed to stay the same in future versions. Some programs in the OEIS suffer from the incorrect assumption that this cannot change in the future.

# Projects

Here are some of the things I am working on OEIS-wise. If you have any comments or suggestions, you can post them on my user talk page.

### Adding PARI programs to sequences

Besides just filling in another section of a sequence, writing a PARI program documents the exact definition of a sequence. I have run across a few sequences that took some effort to determine exactly what the correct definition is.

I use PARI because it's free, and that's a price I can afford.

### Core sequences without PARI programs

I don't know algorithms for these: A000105, A000001, A000088

A000959 is in the works - the definition of lucky numbers is easy to explain, but tricky to program. Does anyone have an algorithm that can determine if n is a lucky number without going through the process described in the definition? Or an algorithm that can calculate the n-th lucky number without going through the process described in the definition?

I believe this is a complete list: A000602, A001349, A005470, A000112, A000273, A038566, A038568, A038569, A074206, A000014, A000019, A020652, A020653, A006966, A000109, A000798, A002106, A003094, A006894, A000609, A002658, A055512, A000140, A001489, A104725, A005036, A005588

### Factors of Integers

### Teaching

Here are some files of interest to my students.

# Notes

The following is just a bunch of notes. Please don't pay much attention to them. If you do have a comment, though, you can post it on my user talk page.

### Some ideas for new sequences

I'm not saying these are noteworthy or even well-defined. And they could already exist. I have only worked on these enough to make my thoughts coherent (and in some cases, maybe not even that much...). Feel free to make a sequence out of any of them. Put your name as author: I figure the author is the person that takes the time to do all the work involved in submitting the sequence. It's easy to come up with ideas like this - the real work is generating the members, checking if the sequence exists, writing the title, examples, comments, etc.

- Sum of prime factors of prime(n)+1, table of prime factors of prime(n)+1, number of prime factors of prime(n)+1 - all can be with or without multiplicity. Also the same thing for prime(n)-1. Some of these already exist - see A210934, A210936, A023514, A023508

- Number of twin prime pairs in the first n primes, first 2^n primes, first 10^n primes, the 2^n-th prime, the 10^n-th prime

- Numbers with a given prime signature:

- First occurrence of n consecutive twin prime pairs, primes p such that primepi(p) is also prime, primepi(p) and primepi(primepi(p)) are both also prime - up to 5 levels

- Random ideas for a new sequence:
- powers of prime(n) - 2, 3, 4, n, prime(n), primepi(n)
- powers of primepi(n) - 2, 3, 4, n, prime(n), primepi(n)
- prime(n) factorial, n factorial
- sums and differences of all the above

- Inspired by sequence A034703: Largest number of the form C(n,a)+C(n,b)+C(n,c) where a+b+c=n. It might be already in the database - I didn't calculate terms and search for it.

- Sequence defined by floor((n*pi)^2): 39,88,157,246,355,483,631,799,986, etc. Best estimate of pi, without going over, of the form sqrt(a(n))/n Maybe also the n and a(n) where sqrt(a(n))/n is a record, or also where sqrt(a(n)+1)/n is a record low, and where either one is closer to pi than any previous

- Expansion of sin(nx) in powers of sin(x). And same for cos(nx) in powers of cos x. Maybe the cross-terms: sin(nx) in powers of cos(x), or cos(nx) in powers of sin(x).

- Products ab for which pi(ab) = pi(a) * pi(b): 1,9,15,21,25,39,40,56,57,65,91,95, etc. Nonsquares: 15,21,39,40,56,57,65,91,95, etc.

- Table of 3^n mod 2^m, 2^n mod 3^m, and other combinations.
- mod 3: 1 2 1 2 1 2 (and repeats 1,2)
- mod 9: 1 2 4 8 7 5 (and repeats)
- mod 27: 1 2 4 8 16 5
- mod 81: 1 2 4 8 16 32
- sequence would be 1, 1, 2, 1, 2, 1, 1, 2, 4, 2, 1, 2, 4, 8, 1 by diagonals Cf. A070337, 2^n mod 27
- Could also present it by rows, no repeating: 1,2,1,2,4,8,7,5,1,2,...

- Numbers that are the difference between a square and a cube - how would you prove it impossible (neither n = x^2 - y^3 nor n = z^3 - w^2 have a solution). Sum of square and cube should be easy to generate and see if it already exists.

- Here's an idea for a set of sequences which may or may not be in the OEIS: for any prime p, if p+1 is m-smooth, then p is a class 1 prime, otherwise p is 1 + the maximum class of the factors of p+1. Could also have p-1. Note that p+1, m=3 gives the Erdos-Selfridge classification of primes. m=2, p+1, 2 is class 2, 3 is class 1, 5 is class 3 m=2, p-1, p=2 is tricky since 2-1=1 has no prime factors - define it to be class 1 for all m. 3 is in class 1, 5 is in class 1, 7 is in class 2

- Sum of quadratic residues of general n, sum of quadratic nonresidues of general n, (sum of residues) - (sum of nonresidues) for prime(n), general n

- This sequence is from Crandall & Pomerance, page 7: r_i is the least prime not already chosen that divides some d+1, where d runs over the divisors of the prod(all previous r_i). For i >= 5, r_i is the i-th prime. (r_1=2) by hand calculation r = 2,3,7,5,11,13,...

- Egyptian fractions: I couldn't find this one in the database. Egyptian fractions are sums of reciprocals of distinct positive integers, like 2/5 = 1/3 + 1/15. I think these values are correct, but I would need to double-check them before publishing them in a sequence. The minimum length is given in A097848.
- Number of distinct minimium-length Egyptian fraction expansions for a/b. For example, a(7,5)=3 since 5/7 = 1/2+1/5+1/70 = 1/2+1/6+1/21 = 1/2+1/7+1/14:
- 3: 1(2/3)
- 4: 1(3/4)
- 5: 1(2/5) 1(3/5) 2(4/5)
- 6: 1(5/6)
- 7: 1(2/7) 6(3/7) 1(4/7) 3(5/7) 1(6/7)

- Number of distinct minimium-length Egyptian fraction expansions for a/b. For example, a(7,5)=3 since 5/7 = 1/2+1/5+1/70 = 1/2+1/6+1/21 = 1/2+1/7+1/14:

- Euler phi, or totient, function: I haven't investigated what's in the database, but some of these are undoubtedly not there:
- a sort of inverse-records: n for which phi(k) > phi(n) for all k > n
- the records occur at the primes, which I know for sure is in the database
- record lows for phi(n)/n or other functions
- sequences along the lines of phi(n) = phi(n-1) + k for various k
- sequences along the lines of phi(n) = alpha * phi(n-1) for various alpha
- similar to the above two but with different spacings (n-2, n-3, [n/2]+1, etc.)
- similar to the above three but with multiple values, e.g. phi(n)=phi(n-1)=phi(n-2) (are there any?)
- if you look at the graph of phi(n), it divides into "bands" - seemingly based on prime factorization, the biggest bands seem to be for 2p, 3p, etc.
- what happens between the primes (e.g. primes for which phi(n) has two local minima before the next prime, twin primes p,p+2 for which phi(p+1) is less than p/3). Twin primes seem to have smaller values of phi(n) between them, though it might be my imagination.
- phi(n) tends to have maxima at odd numbers and minima at even numbers. Or in general, I suppose that it would be smaller if n has small factors. We might be able to smooth it out by only looking at certain prime signatures - for example, n of the form p^2*q (12, 18, 20, etc.). The primes certainly flatten it out.

- Inspired by work on sequence A031923 - I don't really like the way this particular sequence was constructed. As with the others, these might already be in the OEIS.
- products of 2,3,4 Fibonacci numbers (e.g. 2*8*21)
- products of (any number of) Fibonacci numbers
- products of 2,3,4 distinct Fibonacci numbers
- products of 2,3,4 consecutive Fibonacci numbers
- product of first n Fibonacci numbers
- powers of Fibonacci numbers

- The merit of a prime gap is defined in sequence A111870 as (q-p)/ln(p). Here's a few more ideas based on prime gaps and merits of prime gaps:
- Primes p such that there is a gap between p and the next prime with merit >1 (3, 5, 7, 13, 19, 23, 31, 37, 43, 47, ...)
- Primes p such that there is a gap between p and the next prime with merit >2 (7, 113, 139, 199, 211, 293, ...). I don't know how far we could push it.
- Smallest prime p with a gap between p and the next prime with merit >n
- Primes p such that the gap between p and the next prime is twice a prime (13, 19, 23, 31, 37, 43, 47, ...), but I'm not sure why a gap being twice a prime would be important.

- The sequence of isolated (or non-twin) primes is A007510. Since the twin primes are comparatively rare, one would expect the sequence of isolated primes to go to infinity like n log n. We might already have some of these in the database:
- gaps between isolated prime and next isolated prime
- number of isolated primes less than n, n^2, 2^n, 10^n
- products of 2, 3, 4, etc. isolated primes
- numbers with 0, 1, 2, etc. isolated prime factors
- squares, cubes, all powers of isolated primes
- first run of n consecutive isolated primes
- isolated primes of the form 6n+1, 6n-1, etc.
- numbers that are the sum of two (three? four?) isolated primes (Does anyone know whether or not there is an N such that any number greater than some reasonable limit is the sum of n primes?)
- you could specify any gap pattern - isolated primes would be (not 2) - (not 2). I don't think the editors would look kindly on, say, 6 - 4 - 6 - 8 - 6, though. "Primes p such that the next 5 primes are p+6, p+10, p+16, p+24, and p+30" probably won't get into the OEIS unless you can show how it's useful. Good luck on that. By the way, I think that sequence starts 4607, 27793, 95707.
- first k for which (k-th isolated prime)/k is greater than n (Do we even have the corresponding sequence for primes?)

- There are a whole lot of sequences "Primes of the form ...". See the list of references in A170942 for one well-organized grouping. It's possible that there are interesting subsequences generated by counting the number of solutions. For example, "Primes expressible as x^2 + 2y^2 in more than one way". (I didn't find any, by the way).

- Inspired by proposed sequence A219860: a(n) = m such that sigma(m) + sigma(m+1) + ... + sigma(m+n-1) is prime. Does a(n) always exist? The first few terms are:
- a(1) = 2, sigma(2) = 3 is prime
- a(2) = 2, sigma(2) + sigma(3) = 3 + 4 = 7 is prime
- a(3) = 3, sigma(3) + sigma(4) + sigma(5) = 4 + 7 + 6 = 17
- a(4) = 3, a(5) = 3, a(6) = 4, a(7) = 1, a(8) = 3.

- Here's a couple that were proposed then recycled by Zak Seidov. I don't know why - they seemed like reasonable ideas for sequences.

- This one is inspired by the sequence A141092: Product of consecutive composite numbers divided by their sum, whenever the quotient is an integer. For example, (24 * 25 * 26)/(24 + 25 + 26) = 15600, an integer.