This site is supported by donations to The OEIS Foundation.

# User talk:Michael B. Porter

### From OeisWiki

Hello!

Please add questions or comments to the end of this page (make a new category if appropriate). The software automatically sends me an e-mail every time this page is changed. If you would like to e-mail me directly, my e-mail address is michael_b_porter(AT)yahoo.com (with the obvious substitution). Michael B. Porter 23:40, 15 December 2009 (UTC)

## Contents |

## Using brackets with sequence IDs

Hi Michael, if you write the sequence ids with two square brackets (like A090801) they become links and it would be much easier to examine your list of core sequences without PARI programs. Cheers Peter Luschny 18:42, 17 December 2009 (UTC)

- Thanks for the tip. I'll do that. Michael B. Porter 06:36, 18 December 2009 (UTC)

### Using the oeis template with sequence IDs

Since OEIS Wiki does not contain anymore the sequence pages, the square brackets do not work anymore. To access the sequences (on the main OEIS), please use the template

`{{ oeis|A??????}}` or

`{{`(like

**oeis**|A??????|link label}}`{{`giving A000040,

**oeis**|A000040}}`{{`giving Primes or

**oeis**|A000040|Primes}}`[[OEIS:A000040|Primes]]`giving Primes). — Daniel Forgues 06:59, 15 January 2011 (UTC), reedited — Daniel Forgues 20:55, 18 December 2011 (UTC)

- Thanks. I'll fix them eventually. Michael B. Porter 08:24, 15 January 2011 (UTC)

- Now, the MediaWiki software has been configured to automatically create a link from any
`A??????`on the wiki to the sequence on the main OEIS, so now we only need to use`{{`when we want a different link label. — Daniel Forgues 20:55, 18 December 2011 (UTC)**oeis**|A??????|link label}}

- Now, the MediaWiki software has been configured to automatically create a link from any

- Cool. I think I'll go back through and change them all so the software can do its thing. Michael B. Porter 02:30, 19 December 2011 (UTC)

## First occurrence of n consecutive primes in arithmetic progression

User:Michael B. Porter#Some ideas for new sequences mentions it, here it is:

- A006560 Smallest starting prime for n consecutive primes in arithmetic progression. — Daniel Forgues 07:06, 15 January 2011 (UTC)

- Thanks. I removed it from the list. I also put a note that anyone who wants to use my ideas to create a sequence is welcome to them. Michael B. Porter 08:28, 15 January 2011 (UTC)

## Egyptian fractions

For Length of minimum-length and Number of distinct minimium-length Egyptian fraction expansions for a/b, where Egyptian fractions are sums of reciprocals of distinct positive integers, they should be ordered following the Cantor ordering of positive rational numbers. You may want to create the wiki page Egyptian fraction expansions of rational numbers with the two sections above. The wiki currently has the page Greedy Egyptian representation (of real numbers). Did you check Egyptian fractions, sequences related to for the main OEIS? — Daniel Forgues 00:45, 24 December 2011 (UTC)

- The fractions are all less than 1, so the "triangle read by rows" ordering (as in A091834, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, 1/5, ...) seems more straightforward, with the disadvantage that there are repeats (1/2 gets repeated as 2/4, 3/6, etc.). The Cantor ordering would start 1/2, 1/3, 1/4, 2/3, 1/5, 1/6, 2/5, 3/4, ..., which seems a little awkward. Some sequences, e.g. A097848, skip the "repeats".

- I checked the index. I also searched "egyptian fraction" and "unit fraction" in the OEIS search. Here are the "triangle read by rows" type of sequences I found: A097848, A091834, A097847, A050205, A050206, A050210, A100869, A100870, A069581, A111804, A111809. In my search, I found one of the sequences I was looking for: A097848 is the first one, length of minimum-length Egyptian fraction expansion for a/b. Michael B. Porter 03:51, 24 December 2011 (UTC)

- A097848 is for gcd(n,k) = 1, A097847 is the full triangle for 1 ≤ k ≤ n. — Daniel Forgues 07:37, 24 December 2011 (UTC)

## Euler phi, or totient, function

You might want to have a look at the graph of Euler's totient function (totient function) wiki page. — Daniel Forgues 21:53, 30 December 2011 (UTC)

- I was actually looking at the scatterplot on OEIS, which is truly amazing. You can see the "bands" I talked about - they kind of remind me of the rings of Saturn. (Sequence A000010, after the data is "list; graph; refs; listen, etc", choose "graph"). I think the dark bands probably correspond to multiples of primes - 2p, 3p, etc. I don't really have an explanation for the white bands. — Michael B. Porter 06:59, 31 December 2011 (UTC)

- The bands are eerily similar to the ones shown in the 3D plot of the number of steps of the Euclidian algorithm, where the color spectrum red up to violet corresponds to fewest number of steps up to highest number of steps, to obtain the GCD of and . Euler's totient function gives the count of numbers up to that are coprime to . The number of steps of the Euclidean algorithm for the GCD of and depends on the ratio of and and is highest when is nearest to a nonzero power (the lower the absolute value of the exponent, the more pronounced it is) of the Golden ratio lowest when is furthest from a nonzero power of the Golden ratio I don't know if there is a causal relation between those bands and the bands of the graph of the totient function... — Daniel Forgues 18:56, 4-5 January 2012 (UTC)

## znprimroot

To answer your question, at least in part: no, znptimroot is not guaranteed to return the smallest root. I think the current implementation does but I haven't studied the source carefully enough to say. Charles R Greathouse IV 20:16, 31 December 2011 (UTC)

See basemath/arith1.c. Charles R Greathouse IV 20:17, 31 December 2011 (UTC)

znprimroot(10) returns 7 rather than the smallest root 3, znprimroot(82) returns 47 rather than 7, and znprimroot(100000898) returns 50000475 rather than 31. This seems to be a consequence of the m = 2 mod 4 case in the code. The documentation indicates it is only guaranteed to return the smallest when the input is a prime power. It also will return results where no primitive root exists, e.g. znprimroot(21) returns Mod(2,21) (albeit the documentation states that the behavior is undefined in these cases). Dana Jacobsen 19:48, 28 December 2013 (UTC)

## Program

From the last of your suggested sequences:

`a(n)=my(t=sum(i=1,n,sigma(i)),k=1);while(!isprime(t),t-=sigma(k)-sigma(n+k);k++);k`

This generates a 10,000-term b-file in half a minute.

Charles R Greathouse IV 00:57, 18 December 2012 (UTC)

Nice! That might actually inspire me to author the sequence.

Michael B. Porter 03:14, 18 December 2012 (UTC)

## Teaching

FYI: I moved your Teaching link to User:Michael B. Porter/Teaching. This way it's in your User namespace, which should (among other things) discourage other people from editing them. (A well-meaning person might otherwise try to update the pages, maybe even giving answers...!)

The original locations will redirect to these, so if you gave out the old links they still work.

Charles R Greathouse IV 14:29, 1 November 2013 (UTC)

Thank you!

Michael B. Porter 01:44, 2 November 2013 (UTC)