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.

A377012 Numbers k whose digits can be split into substrings so that the sum of these substrings raised to consecutive powers (1, 2, 3, ...) is the number k itself.

This page as a plain text file.
%I A377012 #67 Feb 02 2025 14:53:45
%S A377012 89,135,175,518,598,1306,1370,1371,1676,2045,2427,3055,5755,5918,9899,
%T A377012 11053,24429,88297,135010,234322,255050,255051,360030,360031,494703,
%U A377012 512780,517380,568217,767368,779243,785920,785921,788834,819116,931316,986562,998999,1000100
%N A377012 Numbers k whose digits can be split into substrings so that the sum of these substrings raised to consecutive powers (1, 2, 3, ...) is the number k itself.
%C A377012 At least two substrings are required and each substring must have at least one digit.
%C A377012 A subsequence is A032799 (except for 1-digit numbers).
%C A377012 Unlike A032799, which is finite, this sequence is infinite because; e.g., the pattern 89, 9899, 998999, ... can always be split into two equal-length substrings that generate a term as (10^i - 2)^1 + (10^i - 1)^2 = 10^i*(10^i - 2) + (10^i - 1) for all i > 0.
%C A377012 Leading zeros in strings are allowed here. The first such term generated by the author's program is 1010053 = 1^1 + (01005)^2 + 3^3. - _Michael S. Branicky_, Nov 30 2024
%C A377012 Another pattern is deduced from a(38) = 1000100 = 100^1 + 0^2 + 100^3 with formula (10^i)^1 + 0^2 + ... + 0^n + ([0...0]10^i)^(n+1) = (10^i)^(n+1) + 10^i with i > 1 and n > 1. - _Francesco Di Matteo_, Jan 15 2025
%e A377012 175 = 1^1 + 7^2 + 5^3 is a term.
%e A377012 5755 = 5^1 + 75^2 + 5^3 is a term.
%e A377012 88297 = 88^1 + 297^2 is a term.
%e A377012 234322 = 23^1 + 4^2 + 3^3 + 22^4 is a term.
%o A377012 (Python)
%o A377012 import itertools
%o A377012 analys = range(1, 7) # increase this if you want
%o A377012 for limite in analys:
%o A377012     numbers = range(pow(10,limite-1),pow(10,limite))
%o A377012     r = range(1, limite+1)
%o A377012     disp_temp = []
%o A377012     for s in r:
%o A377012         disp = list(itertools.product(r, repeat=s+1))
%o A377012         disp_temp.extend(disp)
%o A377012     disp_ok = [d for d in disp_temp if sum(d)==limite]
%o A377012     for numero in numbers:
%o A377012         str_numero = str(numero)
%o A377012         for combo in disp_ok:
%o A377012             k = limite
%o A377012             totale = 0
%o A377012             for c in range(len(combo), 0, -1):
%o A377012                 partenza = k-combo[c-1]
%o A377012                 porzione = str_numero[partenza:k]
%o A377012                 if c == 1:
%o A377012                     totale = totale + int(porzione)
%o A377012                 else:
%o A377012                     totale = totale + pow(int(porzione),c)
%o A377012                 k = k - combo[c-1]
%o A377012             if totale == numero:
%o A377012                 print(numero)
%Y A377012 Cf. A005188, A208130, A347189, A362843.
%K A377012 nonn,base
%O A377012 1,1
%A A377012 _Francesco Di Matteo_, Oct 28 2024