A246422 Numbers in which cubes may end (in base 10).
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, 36, 37, 39, 41, 43, 44, 47, 48, 49, 51, 52, 53, 56, 57, 59, 61, 63, 64, 67, 68, 69, 71, 72, 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
Offset: 1
Examples
33 is a member because 77^3 = 456533 is a cube ending in 33.
Links
- Ivan Neretin, Table of n, a(n) for n = 1..5065
Programs
-
Mathematica
Union@Flatten@Table[Mod[i^3, 10^n], {n, 3}, {i, 10^n}] (* Ivan Neretin, Aug 30 2015*)
-
PARI
v=[];for(k=1,10^3,for(m=1,3, v=concat(v,k^3%10^m)));v=vecsort(v,,8)
-
PARI
a=[]; for(m=1, 3, a=setunion(a, Set(vector(10^m, n, n^3)%10^m))); a
-
Python
from itertools import count, islice from sympy import nthroot_mod def A246422_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:len(nthroot_mod(n,3,10**(len(str(n))))),count(max(startvalue,0))) A246422_list = list(islice(A246422_gen(),20)) # Chai Wah Wu, Feb 16 2023
Extensions
Corrected by Ivan Neretin, Mar 03 2016
Comments