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.

Showing 1-2 of 2 results.

A296138 a(n) is the largest number m such that m = n^d_1 + n^d_2 + ... + n^d_k where d_k represents the k-th digit in the decimal expansion of m, or 0 if no such number exists.

Original entry on oeis.org

1, 0, 12, 595968, 3909511, 0, 13177388, 1033, 10, 0, 0, 0, 0, 0, 77399307003, 1053202, 7413245658, 419370838921, 985992657240, 1347536041, 3216829919793, 1262490630568, 3606012949057, 5398293152472, 4119883235101, 0, 24006899084988, 405287637330, 15577274860798
Offset: 1

Views

Author

Chai Wah Wu, Dec 06 2017

Keywords

Comments

a(n) = A236067(n) if and only if A296139(n) <= 1.
a(1000) = 1000000000001000003017, a(10000) = 0. - Chai Wah Wu, Dec 07 2017

Examples

			a(4) = 595968 since 595968 = 4^5 + 4^9 + 4^5 + 4^9 + 4^6 + 4^8 and it is the largest such number. It is different from A236067(4).
a(5) = 3909511 since 3909511 = 5^3 + 5^9 + 5^0 + 5^9 + 5^5 + 5^1 + 5^1 and it is the largest such number. It is the same as A236067(5).
		

Crossrefs

Cf. A139410, A236067 (least such number), A296139 (number of solutions).

Programs

  • PARI
    apply( {A296138(n)=my(m, N);while(n+m>10^m, m++); N=m; while(N*n^9>=10^N, N++); forstep(N=10^(N-!!N),10^m,-1, vecsum([n^d|d<-digits(N)])==N && return(N))}, [1..4]) \\ Naïve brute force; very slow for n > 4. - M. F. Hasler, Jul 24 2025

A296139 a(n) is the number of positive integers m such that m = n^d_1 + n^d_2 + ... + n^d_k where d_k represents the k-th digit in the decimal expansion of m.

Original entry on oeis.org

1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 1, 3, 2, 1, 1, 3, 0, 2, 1, 2, 2, 3, 1, 3, 1, 3, 2, 1, 3, 0, 2, 1, 2, 0, 1, 0, 0, 1, 3, 3, 3, 0, 2, 3, 0, 2, 1, 0, 3, 2, 0, 2, 2, 5, 1, 3, 4, 2, 0, 3, 0, 1, 1, 2, 3, 0, 1, 1, 3, 0, 3, 0, 2, 5, 0, 1, 4, 0
Offset: 1

Views

Author

Chai Wah Wu, Dec 06 2017

Keywords

Examples

			a(4) = 2 since 4624 = 4^4 + 4^6 + 4^2 + 4^4 and 595968 = 4^5 + 4^9 + 4^5 + 4^9 + 4^6 + 4^8 and these are the only such numbers (see A139410).
		

Crossrefs

Showing 1-2 of 2 results.