OFFSET
1,1
COMMENTS
Complement of A246422.
The terms with n digits are the complement in [10^(n-1) .. 10^n-1] of the set of residues of k^3 mod 10^n for 10^((n-1)/3) < k < 10^n. - M. F. Hasler, Jan 26 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
seq(op(sort(convert({$10^(d-1)..10^d-1} minus map(t -> t^3 mod 10^d, {$0..10^d-1}), list))), d=1..3); # Robert Israel, Jan 26 2020
PROG
(PARI) v=vector(1000); for(k=1, 10^4, my(q=k^3, w=digits(q)); for(j=0, 2, v[1+fromdigits(w[#w-j..#w])]++)); for(k=1, 160, if(v[k]==0, print1(k-1, ", "))) \\ Hugo Pfoertner, Jan 26 2020
(PARI) A246449_row(n)=setminus([10^(n-1)..10^n-1], Set([k^3|k<-[sqrtnint(10^(n-1), 3)+1..10^n-1]]%10^n)) \\ Yields the n-digit terms. - M. F. Hasler, Jan 26 2020
(Python)
from sympy import nthroot_mod
from itertools import count, islice
def A246449_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda n:not len(nthroot_mod(n, 3, 10**(len(str(n))))), count(max(startvalue, 0)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Aug 26 2014
EXTENSIONS
Corrected by Robert Israel, Jan 26 2020
Name edited and incorrect PARI program deleted by M. F. Hasler, Jan 26 2020
STATUS
approved