login
A319441
Cubes of non-palindromic numbers.
2
1000, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 39304, 42875, 46656, 50653, 54872, 59319, 64000, 68921, 74088, 79507, 91125, 97336, 103823, 110592, 117649, 125000, 132651, 140608
OFFSET
1,1
COMMENTS
This is not a subsequence of A029742. - Bruno Berselli, Sep 19 2018
LINKS
G. J. Simmons, Palindrome cubes: Problem B-183, Fibonacci Quart. 8 (1970), no. 5, p. 551.
FORMULA
a(n) = A029742(n)^3.
EXAMPLE
2201^3 = 10662526601 is a term.
MATHEMATICA
palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; DeleteCases[Range[10, 110], _?palQ]^3 (* Vincenzo Librandi, Sep 19 2018 *)
Select[Range[100], !PalindromeQ[#]&]^3 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2019 *)
PROG
(Magma) [n^3: n in [0..65] | Intseq(n) ne Reverse(Intseq(n))]; // Vincenzo Librandi, Sep 19 2018
(PARI) is_a029742(n)=my(d=digits(n)); d!=Vecrev(d) \\ after Charles R Greathouse IV in A029742
terms(n) = my(i=0, x=1); while(1, if(i==n, break, if(is_a029742(x), print1(x^3, ", "); i++)); x++)
/* Print initial 40 terms as follows */
terms(40) \\ Felix Fröhlich, Sep 19 2018
(Python)
def A319441(n):
def f(x): return n+x//10**((l:=len(s:=str(x)))-(k:=l+1>>1))-(int(s[k-1::-1])>x%10**k)+10**(k-1+(l&1^1))-1
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m**3 # Chai Wah Wu, Jul 24 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Sep 19 2018
STATUS
approved