cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

User: Benjamin Knight

Benjamin Knight's wiki page.

Benjamin Knight has authored 6 sequences.

A327152 r values of Triphosian primes.

Original entry on oeis.org

2, 2, 2, 0, 0, 0, 5, 5, 5, 0, 0, 0, 11, 11, 11, 0, 0, 0
Offset: 1

Author

Benjamin Knight, Nov 28 2019

Keywords

Comments

All values will be either 0, 2, or in A007528.

References

  • Keely Grossnickle, Brian Hollenbeck, Jeana Johnson & Zhihao Sun, Triphos: A World Without Subtraction, Mathematics Magazine, 92:4 (2019), 272-285.

Crossrefs

A307694 b values of Triphosian primes.

Original entry on oeis.org

0, 0, 2, 0, 2, 2, 0, 0, 5, 0, 5, 5, 0, 0, 11, 0, 11, 11
Offset: 1

Author

Benjamin Knight, Nov 28 2019

Keywords

Comments

All values will be either 0, 2, or in A007528.

References

  • Keely Grossnickle, Brian Hollenbeck, Jeana Johnson & Zhihao Sun, Triphos: A World Without Subtraction, Mathematics Magazine, 92:4 (2019), 272-285.

Crossrefs

A307692 g values of Triphosian primes.

Original entry on oeis.org

0, 2, 0, 2, 0, 2, 0, 5, 0, 5, 0, 5, 0, 11, 0, 11, 0, 11
Offset: 1

Author

Benjamin Knight, Nov 28 2019

Keywords

Comments

All values will be either 0, 2, or in A007528.

References

  • Keely Grossnickle, Brian Hollenbeck, Jeana Johnson & Zhihao Sun, Triphos: A World Without Subtraction, Mathematics Magazine, 92:4 (2019), 272-285.

Crossrefs

A320572 The smallest integer m such that each nonzero digit appears in the decimal representation of the sequence n^1, n^2, ..., n^x, where 1 <= x <= m, or 0 if no such m exists.

Original entry on oeis.org

0, 15, 8, 10, 11, 12, 7, 5, 6, 0, 7, 6, 6, 5, 9, 5, 6, 4, 5, 15, 8, 6, 4, 5, 8, 5, 4, 5, 7, 8, 7, 7, 6, 8, 7, 6, 6, 5, 6, 10, 7, 6, 6, 5, 6, 6, 5, 7, 6, 11, 6, 6, 6, 4, 5, 7, 4, 5, 4, 12, 4, 6, 7, 7, 8, 4, 4, 5, 3, 7, 4, 5, 6, 7, 6, 4, 5, 6, 4, 5, 6, 5, 4, 4, 6, 5, 5, 4, 7, 6, 4, 5, 4, 6, 4, 4, 4, 6
Offset: 1

Author

Benjamin Knight, Oct 15 2018

Keywords

Comments

7 is the only fixed point less than 10.

Examples

			For n=1, a(1) = 0, because all powers are identical to 1, and it is not possible to get any other digits.
For n=3, a(3) = 8 because the following are needed to use all nonzero digits: 3^1 = 3, 3^2 = 9, 3^3 = 27, 3^4 = 81, 3^5 = 243, 3^8 = 6561.
For n=10, a(10) = 0, because one can only get digits 0 and 1.
		

Crossrefs

Cf. A090493.

Programs

  • Mathematica
    a[n_] := If[IntegerQ[Log10[n]], 0, Module[{s={0}, m=1}, While[Length[s]<10, s=DeleteDuplicates@Catenate[{s,IntegerDigits[n^m]}]; m++]; m-1]]; Array[a,100] (* Amiram Eldar, Nov 14 2018 *)
  • PARI
    a(n) = {if (10^valuation(n, 10) == n, return(0)); v = []; kn = n; for (m=1, oo, v = Set(concat(v, digits(n))); v = select(x->(x>0), v); if (#v == 9, return (m)); n *= kn;);} \\ Michel Marcus, Oct 17 2018
    
  • PARI
    a(n) = {if(vecsum(digits(n))==1, return(0)); my(v = vector(9), todo = 9, t = n); for(i=1, oo, d=digits(t); for(j = 1, #d, if(d[j] > 0 && v[d[j]] == 0, todo--; v[d[j]] = 1; if(todo <= 0, return(i)))); t*=n)} \\ David A. Corneth, Oct 17 2018
  • Python
    def A320572(n):
        n = int(str(n).strip('0'))
        if n != 1:
            s = set(range(1, 10))
            a = 0
            m = 1
            while s:
                a += 1
                m *= n
                s.difference_update(int(z) for z in str(m))
            return a
        else:
            return 0
    

Formula

a(n) = a(10*n).
a(n) <= A090493(n). - Rémy Sigrist, Oct 16 2018

A304207 a(1)=17; for n>1, a(n) = (a(n-1)^2 - 1)/2 if n is even, a(n-1) + 1 if n is odd.

Original entry on oeis.org

17, 144, 145, 10512, 10513, 55261584, 55261585, 1526921388356112, 1526921388356113, 1165744463109679828308252234384, 1165744463109679828308252234385, 679480076635437837059150531810555804350472205781672488164112, 679480076635437837059150531810555804350472205781672488164113
Offset: 1

Author

Benjamin Knight, May 08 2018

Keywords

Comments

{17, 144, 145}, {145, 10512, 10513}, {10513, 55261584, 55261585}, ... are sides {a < b < c} of the right triangles, with hypotenuse c = b + 1.

Crossrefs

Same basic form as A076601, A076602, A076603, and A076604.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[n],(a^2-1)/2,a+1]}; NestList[nxt,{1,17},20][[All,2]] (* Harvey P. Dale, Mar 27 2021 *)
  • PARI
    a(n) = if(n==1,17,if(n%2,a(n-1)+1,(a(n-1)^2 - 1)/2)) \\ Eric Chen, Jun 09 2018

A304120 a(n) is the least k such that there is a permutation of the positive integers from 1 through k for which every pair of adjacent terms sums to a perfect power with exponent n.

Original entry on oeis.org

2, 15, 305, 6479
Offset: 1

Author

Benjamin Knight, May 06 2018

Keywords

Comments

From Jordan D Fredette, May 28 2019: (Start)
I was helped immensely by my friend Christian Burns who is an expert programmer.
I also worked with my friend Josiah Findley. Without him I likely would have never figured this out.
Essentially, I discovered that when arranging the numbers 1..k so that any two next to each other add up to a perfect power, we need not check every single permutation.
In fact, the best method is to list all the different ways to add up two numbers to get each of the powers which are greater than 1 but less than 2k.
If any number shows up only once in this list, then it must be an endpoint.
Once the endpoints are determined, any number that only shows up twice must be connected to the two other numbers with which it is paired in the list.
This will result in strings of numbers which must be a part of the permutation.
If the same number is at the end of two different strings then those strings must be joined.
Thus, the number of permutations to be checked is further decreased.
Basically, Christian was able to implement this as a program and found that 6479 is the smallest k for which the numbers 1..k can be arranged so that any two next to each other add up to a perfect fourth power. (End)

Examples

			a(1) = 2 as the permutation (1, 2) of the integers has the property that the adjacent terms sum to a power of 1.
a(2) = 15 as the permutation of the positive integers 1 through 15 [8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9] has the property that every pair of adjacent terms sums to a power with exponent n = 2 (a square).
		

Crossrefs

For n=2, see A090461.

Programs

  • Sage
    See MathOverflow link.

Extensions

a(4) from Jordan D Fredette, May 28 2019