login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246449 Numbers n such that no cube can end in n (in the sense of the respective decimal expansions). 5

%I #20 Feb 16 2023 17:10:01

%S 10,14,15,18,20,22,26,30,34,35,38,40,42,45,46,50,54,55,58,60,62,65,66,

%T 70,74,78,80,82,85,86,90,94,95,98,100,102,105,106,108,110,114,115,116,

%U 118,120,122,124,126,130,132,134,135,138,140,142,145,146,148,150,154,155

%N Numbers n such that no cube can end in n (in the sense of the respective decimal expansions).

%C Complement of A246422.

%C 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

%H Robert Israel, <a href="/A246449/b246449.txt">Table of n, a(n) for n = 1..10000</a>

%p 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

%o (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

%o (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

%o (Python)

%o from sympy import nthroot_mod

%o from itertools import count, islice

%o def A246449_gen(startvalue=0): # generator of terms >= startvalue

%o return filter(lambda n:not len(nthroot_mod(n,3,10**(len(str(n))))),count(max(startvalue,0)))

%o A246449_list = list(islice(A246449_gen(),20)) # _Chai Wah Wu_, Feb 16 2023

%Y Cf. A246422.

%K nonn,base

%O 1,1

%A _Derek Orr_, Aug 26 2014

%E Corrected by _Robert Israel_, Jan 26 2020

%E Name edited and incorrect PARI program deleted by _M. F. Hasler_, Jan 26 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)