OFFSET
1,2
COMMENTS
Numbers ending in 0 are not included except 0. - Harry J. Smith, Mar 13 2010
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..55
EXAMPLE
4227990528 = 65023^2 - 1 and 8250997224 = 90835^2 - 1.
MAPLE
rev:= proc(x) local L, i;
L:= convert(x, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
filter:= proc(x)
x mod 10 <> 0 and issqr(rev(x)+1)
end proc:
filter(0):= true:
select(filter, [seq(x^2-1, x=1..10^6)]); # Robert Israel, Nov 08 2023
MATHEMATICA
dtn[L_] := Fold[10#1+#2&, 0, L] A={}; For[i=1, i>0, i++, t=dtn[Reverse[IntegerDigits[i^2-1]]]; If[IntegerQ[(t+1)^(1/2)]&&Mod[i^2, 10]=!=1, AppendTo[A, i^2-1]; Print[A]]]
okQ[n_]:=Module[{idn=IntegerDigits[n]}, Last[idn]!=0&& IntegerQ[Sqrt[ FromDigits[ Reverse[idn]]+1]]]; Join[{0}, Select[Range[180000]^2-1, okQ]] (* Harvey P. Dale, Apr 11 2011 *)
PROG
(PARI) Rev(x)= { local(d, r=0); while (x>0, d=x%10; x\=10; r=r*10 + d); return(r) }
{ n=0; for (m=0, 10^10, k=m^2 - 1; if (k%10 && issquare(Rev(k) + 1), if (m==0, k=0); write("b066619.txt", n++, " ", k); if (n==100, return)) ) } \\ Harry J. Smith, Mar 13 2010
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Erich Friedman, Jan 08 2002
EXTENSIONS
More terms from Christopher Lund (clund(AT)san.rr.com), Apr 14 2002
Offset changed from 0 to 1 by Harry J. Smith, Mar 13 2010
STATUS
approved