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-3 of 3 results.

A225301 Number of solutions to rev(x^2) = rev(x)^2 with at most n digits, where the function rev(x) reverses the digits of x.

Original entry on oeis.org

4, 10, 25, 64, 154, 363, 820, 1811, 3873, 8161, 16682, 33757, 66865, 130938, 251983, 480794, 903982, 1685564, 3106009, 5677864, 10276936, 18464659, 32891188, 58169965, 102136773, 178096365, 308593320, 531191385, 909227947, 1546356486, 2617639293
Offset: 1

Views

Author

David Radcliffe, May 05 2013

Keywords

Comments

Numbers (other than 0) that end in zero are excluded.

Examples

			For n = 2 the a(2) = 10 solutions are 0, 1, 2, 3, 11, 12, 13, 21, 22, 31.
		

Crossrefs

Formula

Equals one more than the partial sums of A098701.

A098690 Number of solutions to rev(x^2)=rev(x)^2 below 10^n.

Original entry on oeis.org

3, 9, 24, 63, 153, 362, 819, 1810, 3872, 8160, 16681, 33756, 66864, 130937, 251982, 480793, 903981, 1685563, 3106008, 5677863, 10276935, 18464658, 32891187, 58169964, 102136772, 178096364, 308593319, 531191384, 909227946, 1546356485, 2617639292
Offset: 1

Views

Author

Martin Renner, Oct 27 2004

Keywords

Comments

Partial sums of A098701. - Michel Marcus, Apr 11 2014
Excludes multiples of 10. - David Radcliffe, Aug 28 2021
Also the number of skinny numbers (A061909) with n digits, excluding 0. - David Radcliffe, Aug 28 2021

Examples

			For n = 2 the a(2) = 9 solutions are 1, 2, 3, 11, 12, 13, 21, 22, 31. - _David Radcliffe_, Aug 28 2021
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Differences[Table[Length[Select[Range[10^n],f[#^2]==f[#]^2&]],{n,0,6}]] (* Geoffrey Critzer, Dec 18 2013 *)
  • Python
    def rev(n): return int(str(n)[::-1])
    def a(n): return sum(k % 10 and rev(k**2) == rev(k)**2 for k in range(10**n)) # David Radcliffe, Aug 28 2021

Extensions

a(7),a(8) from Geoffrey Critzer, Dec 18 2013
Extended using A098701 by Michel Marcus, Apr 11 2014

A340491 Number of n-digit numbers x such that rev(x^2) = rev(x)^2 and x does not contain any zero digits, where rev(x) is the digit reversal of x.

Original entry on oeis.org

3, 6, 9, 11, 10, 7, 7, 1, 1
Offset: 1

Views

Author

Sébastien Dumortier, Jan 10 2021

Keywords

Comments

The number of solutions of rev(x^2) = rev(x)^2 increases but the solutions with a 0 don't. Any number with more than 9 digits can't be a solution, due to the development of x^2.

Examples

			The 7 solutions with 7 digits are 1111111, 1111112, 1111121, 1111211, 1121111, 1211111, 2111111.
		

Crossrefs

Cf. A098701 (number of solutions) and A085305 (the solutions), where digit 0 is not forbidden.
Cf. A004086 (digit reversal), A052382 (zeroless numbers).

Programs

  • PARI
    isok(k) = my(d=digits(k)); vecmin(d) && (fromdigits(Vecrev(digits(k^2))) == fromdigits(Vecrev(d))^2);
    a(n) = sum(k=10^(n-1), 10^n-1, isok(k)); \\ Michel Marcus, Jan 16 2021
Showing 1-3 of 3 results.