Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Nov 10 2024 14:46:14
%S 0,1,2,3,4,5,6,7,8,9,11,12,13,16,17,19,21,23,24,25,27,28,29,31,32,33,
%T 36,37,39,41,43,44,47,48,49,51,52,53,56,57,59,61,63,64,67,68,69,71,72,
%U 73,75,76,77,79,81,83,84,87,88,89,91,92,93,96,97,99,101,103,104,107,109,111,112,113,117
%N Numbers in which cubes may end (in base 10).
%H Ivan Neretin, <a href="/A246422/b246422.txt">Table of n, a(n) for n = 1..5065</a>
%e 33 is a member because 77^3 = 456533 is a cube ending in 33.
%t Union@Flatten@Table[Mod[i^3, 10^n], {n, 3}, {i, 10^n}] (* _Ivan Neretin_, Aug 30 2015*)
%o (PARI)
%o v=[];for(k=1,10^3,for(m=1,3, v=concat(v,k^3%10^m)));v=vecsort(v,,8)
%o (PARI)
%o a=[]; for(m=1, 3, a=setunion(a, Set(vector(10^m, n, n^3)%10^m))); a
%o (Python)
%o from itertools import count, islice
%o from sympy import nthroot_mod
%o def A246422_gen(startvalue=0): # generator of terms >= startvalue
%o return filter(lambda n:len(nthroot_mod(n,3,10**(len(str(n))))),count(max(startvalue,0)))
%o A246422_list = list(islice(A246422_gen(),20)) # _Chai Wah Wu_, Feb 16 2023
%Y Cf. A238712, A246449.
%K nonn,base
%O 1,3
%A _Derek Orr_, Aug 25 2014
%E Corrected by _Ivan Neretin_, Mar 03 2016