%I #23 Oct 08 2023 15:34:28
%S 0,7,999,999999,258474852,999999999,999999999999,999999999999999,
%T 999999999999999999,999999999999999999999,999999999999999999999999,
%U 999999999999999999999999999,999999999999999999999999999999,999999999999999999999999999999999
%N Palindromes of the form k^3-1.
%C Sequence is infinite as (10^k)^3-1 is a term for all k >= 0. - _Michael S. Branicky_, Mar 27 2021
%e 999 = 10^3-1 and is a palindrome.
%t For[n=0,n<100000000,n++,If[n^3-1==IntegerReverse[n^3-1],Print[n^3-1]]] (* _Dylan Delgado_, Mar 02 2021 *)
%t Select[Range[10^7]^3-1,PalindromeQ] (* The program generates the first ten terms of the sequence. *) (* _Harvey P. Dale_, Oct 08 2023 *)
%o (Python)
%o def afind(limit):
%o for n in range(limit+1):
%o s = str(n**3 - 1)
%o if s == s[::-1]: print(int(s), end=", ")
%o print(afind(10**7)) # _Michael S. Branicky_, Mar 27 2021
%Y Intersection of A002113 and A068601.
%K base,nonn
%O 1,2
%A _Erich Friedman_, Jul 21 2001
%E One more term from _Emeric Deutsch_, Feb 26 2005
%E a(10)-a(14) from _Michael S. Branicky_, Mar 27 2021
|