OFFSET
0,3
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..2000
FORMULA
left$(str$(n), 1) = left$(str$(n^3), 1) AND right$(str$(n), 1) = right$(str$(n^3), 1)
EXAMPLE
a(12) = 109 appears in the sequence because 109*109*109 = 1295029.
MATHEMATICA
sidQ[n_]:=Module[{idn=IntegerDigits[n], i3=IntegerDigits[n^3]}, idn[[1]]==i3[[1]]&&idn[[-1]]== i3[[-1]]]; Select[Range[0, 400], sidQ] (* Harvey P. Dale, May 14 2023 *)
PROG
(PARI) isok(n) = (n == 0) || ((dn=digits(n)) && (ds=digits(n^3)) && (dn[#dn] == ds[#ds])); \\ Michel Marcus, Mar 19 2015
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jeremy Gardiner, Jul 20 2003
STATUS
approved