A301912 Numbers k such that the decimal representation of k ends that of the sum of the first k cubes.
0, 1, 5, 25, 76, 376, 500, 625, 876, 1876, 2500, 5001, 5625, 9376, 15625, 25001, 40625, 50001, 62500, 65625, 71876, 75001, 90625, 109376, 171876, 265625, 375001, 390625, 500001, 765625, 875001, 890625, 1171876, 2265625, 2890625, 4062500, 4375001, 5000001
Offset: 1
Examples
The sum of the first five cubes is 225, which ends in 5, so 5 is in the sequence.
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 1..61
- Robert Dawson, On Some Sequences Related to Sums of Powers, J. Int. Seq., Vol. 21 (2018), Article 18.7.6.
- Wikipedia, Hensel's lemma
Programs
-
Mathematica
seq = {}; Do[If[StringTake[ToString[k^2*(k+1)^2/4], -StringLength[ToString[k]]] == ToString[k], seq = Join[seq, {k}]], {k, 0, 1000000}]; seq (* Vaclav Kotesovec, Mar 29 2018 *)
-
Python
A301912_list, k, n = [], 1, 1 while len(A301912_list) < 100: if n % 10**(len(str(k))) == k: A301912_list.append(k) k += 1 n += k**3 # Chai Wah Wu, Mar 30 2018
Extensions
Corrected and extended by Vaclav Kotesovec, Mar 29 2018
Comments