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: Carl Witthoft

Carl Witthoft's wiki page.

Carl Witthoft has authored 1 sequences.

A357579 Lexicographically earliest sequence of distinct numbers such that no sum of consecutive terms is a square or higher power of an integer.

Original entry on oeis.org

2, 3, 7, 5, 6, 12, 10, 11, 17, 18, 15, 13, 20, 14, 23, 19, 28, 26, 22, 21, 29, 33, 35, 37, 24, 31, 30, 38, 34, 41, 39, 40, 44, 43, 46, 42, 51, 45, 54, 53, 48, 57, 47, 50, 59, 52, 61, 58, 55, 60, 56, 66, 67, 65, 62, 70, 63, 69, 73, 72, 76, 74, 68, 79
Offset: 1

Author

Carl Witthoft, Oct 03 2022

Keywords

Comments

This is inspired by sequence A254337, where sums equal to prime numbers are disallowed.
An unproved conjecture (for the present sequence) is that all integers which are not nontrivial powers will eventually appear.

Examples

			Clearly 0 and 1 are powers of themselves so they are rejected. 2 is the first term. Then neither 3 nor (3+2) is a power so 3 is accepted. 4 is a power and thus rejected. (5+3) is 2^3, so reject (for now) 5. Same for 6; (7+3) and (7+3+2) are not powers, so 7 is accepted.
		

Crossrefs

Cf. A254337.

Programs

  • PARI
    See Links section.
  • Python
    def is_pow(n, k):
        while n%k == 0: n = n//k
        return n == 1
    def any_power(n):
        return any((is_pow(n, k) for k in range(2,1+n//2)))
    terms,s,sums = [2,], set((2,)), set((2,))
    for i in range(100):
        t = 3
        while t in s or any_power(t) or any((any_power(j + t) for j in sums)):
            t+=1
        s.add(t);terms.append(t)
        sums = set(map(lambda k:k+t, sums))
        sums.add(t)
    print(terms) # Gleb Ivanov, Oct 07 2022
    
  • R
    # hasAnyPwr  and helper function are in the GitHub link