cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A070254 Perfect squares one more than a palindrome.

Original entry on oeis.org

1, 4, 9, 100, 324, 576, 4225, 5776, 10000, 36864, 42025, 1000000, 3055504, 3640464, 5597956, 8803089, 32855824, 100000000, 360696064, 422919225, 10000000000, 30485858404, 30536863504, 32154945124, 59080108096, 86310801369, 304816618404, 1000000000000, 3490500050944
Offset: 1

Views

Author

Amarnath Murthy, May 06 2002

Keywords

Comments

All even powers of 10 are members of both A070254 and A027720.

Crossrefs

Programs

  • Mathematica
    Do[ If[a = IntegerDigits[n^2 - 1]; a == Reverse[a], Print[n^2]], {n, 1, 10^6}]
    Select[Range[300000]^2,PalindromeQ[#-1]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 06 2018 *)

Formula

a(n) = A070253(n)^2 = A028504(n) + 1. - Giovanni Resta, Aug 29 2018

Extensions

Edited by Jason Earls and Robert G. Wilson v, May 08 2002
Offset changed by and more terms from Giovanni Resta, Aug 28 2018

A028503 Numbers k such that k*(k+2) is a palindrome.

Original entry on oeis.org

0, 1, 2, 9, 17, 23, 64, 75, 99, 191, 204, 999, 1747, 1907, 2365, 2966, 5731, 9999, 18991, 20564, 99999, 174601, 174747, 179317, 243063, 293786, 552101, 999999, 1868287, 2967032, 9200156, 9999999, 22765895, 31552659, 93809716, 99999999, 185812387, 999999999
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse[d]]; Select[Range[0, 10^5], palQ[# (# + 2)] &] (* Giovanni Resta, Aug 29 2018 *)

Formula

a(n) = A070253(n) - 1. a(n) * (a(n) + 2) = A028504(n). - Giovanni Resta, Aug 29 2018

Extensions

More terms from Giovanni Resta, Aug 28 2018

A287389 Both k and its reverse are one less than a square.

Original entry on oeis.org

0, 3, 8, 80, 99, 323, 360, 575, 840, 4224, 5775, 9999, 32760, 36480, 36863, 42024, 84680, 349280, 808200, 829920, 848240, 998000, 999999, 3055503, 3272480, 3426200, 3640463, 3644280, 3682560, 5597955, 8462280, 8803088, 30481440, 32855823, 80622440, 99999999
Offset: 1

Views

Author

Bruno Berselli, May 24 2017

Keywords

Comments

Contains A028504. - Robert Israel, May 25 2017
Except for the first term, the first digit of each term is either 3, 4, 5, 8 or 9. - Chai Wah Wu, May 25 2017

Examples

			32760 is in the sequence because 32760 = 181^2-1 and its reverse 6723 = 82^2 - 1.
		

Crossrefs

Cf. A124664: both k and its reverse are one more than a square.

Programs

  • Maple
    r:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    select(x-> issqr(r(x)+1), [n^2-1$n=1..10000])[]; # Alois P. Heinz, May 24 2017
  • Mathematica
    Select[Range[0, 10^6], Function[n, Times @@ Boole@ Map[IntegerQ@ Sqrt@ # &, {n + 1, FromDigits@ Reverse@ IntegerDigits@ n + 1}] == 1]] (* Michael De Vlieger, May 24 2017 *)
  • PARI
    isok(n) = issquare(n+1) && issquare(fromdigits(Vecrev(digits(n)))+1); \\ Michel Marcus, May 24 2017

A066619 Both n and its reverse are one less than a square.

Original entry on oeis.org

0, 3, 8, 99, 323, 575, 4224, 5775, 9999, 36863, 42024, 999999, 3055503, 3640463, 5597955, 8803088, 32855823, 99999999, 360696063, 422919224, 4227990528, 8250997224, 9999999999, 30485858403, 30536863503, 32154945123
Offset: 1

Views

Author

Erich Friedman, Jan 08 2002

Keywords

Comments

Numbers ending in 0 are not included except 0. - Harry J. Smith, Mar 13 2010

Examples

			4227990528 = 65023^2 - 1 and 8250997224 = 90835^2 - 1.
		

Crossrefs

Contains A028504.

Programs

  • 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 *)
  • 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

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
Showing 1-4 of 4 results.