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.

A354153 a(n) is the smallest value of a+b+c for nonnegative integers such that a^b + c = n.

This page as a plain text file.
%I A354153 #21 Jun 07 2022 11:12:29
%S A354153 0,1,2,3,4,5,6,5,5,6,7,8,9,10,11,6,7,8,9,10,11,12,13,14,7,8,6,7,8,9,
%T A354153 10,7,8,9,10,8,9,10,11,12,13,14,15,16,17,18,19,20,9,10,11,12,13,14,15,
%U A354153 16,17,18,19,20,21,22,23,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
%N A354153 a(n) is the smallest value of a+b+c for nonnegative integers such that a^b + c = n.
%C A354153 An obvious upper bound for this sequence is a(n) <= n-1 because 0^0 + (n-1) = n.
%C A354153 Another upper bound can be defined recursively: a(n) <= a(n-1) + 1 because if n-1 = a^b + c, then n = a^b + c + 1, thus one possible sum is a+b+c+1 or a(n-1) + 1.
%e A354153 a(1) = 0 because 0^0 + 0 = 1 and 0 + 0 + 0 = 0.
%e A354153 a(9) = 5 because 3^2 + 0 = 9 and 3 + 2 + 0 = 5 and there is no ordered triple (a,b,c) such that a^b + c = 9 with a+b+c < 5.
%o A354153 (Python)
%o A354153 def a(n):
%o A354153     minSum = n-1
%o A354153     for a in range(n-1):
%o A354153         for b in range(n-a-1):
%o A354153             if a**b>n:
%o A354153                 break
%o A354153             c = n-a**b
%o A354153             if a+b+c<minSum:
%o A354153                 minSum = a+b+c
%o A354153     return minSum
%K A354153 nonn
%O A354153 1,3
%A A354153 _Joshua R. Tint_, May 27 2022