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

A358880 Squares of the form k + reverse(k) for at least one k.

Original entry on oeis.org

4, 16, 121, 484, 625, 1089, 10201, 14641, 19881, 40804, 49284, 69696, 91809, 94249, 203401, 698896, 1002001, 1234321, 1490841, 1517824, 4008004, 4276624, 4460544, 4937284, 5313025, 6325225, 6895876, 6948496, 7706176, 9018009, 15665764, 15776784, 16120225
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 04 2022

Keywords

Examples

			56 + reverse(56) = 56 + 65 = 121 = 11^2, so 121 is a term.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def aupto(lim): return sorted(set(t for t in (k + int(str(k)[::-1]) for k in range(1, lim+1)) if t <= lim and isqrt(t)**2 == t))
    print(aupto(10**7)) # Michael S. Branicky, Dec 25 2022

Formula

a(n) = A356648(n)^2. - Michel Marcus, Dec 25 2022

A358984 The number of n-digit numbers k such that k + digit reversal of k (A056964) is a square.

Original entry on oeis.org

3, 8, 19, 0, 169, 896, 1496, 3334, 21789, 79403, 239439, 651236, 1670022, 3015650, 27292097, 55608749, 234846164, 366081231, 2594727780, 6395506991
Offset: 1

Views

Author

Nicolay Avilov, Dec 08 2022

Keywords

Comments

Number of terms of A061230 which are n digits long.

Examples

			a(1) = 3 because there are 3 single-digit numbers: 0, 2, 8 such that b + b = m^2, for example, 8 + 8 = 16 = 4^2;
a(2) = 8 because there are 8 two-digit numbers: 29, 38, 47, 56, 65, 74, 83, 92 such that bc + cb = m^2, for example, 29 + 92 = 121 = 11^2.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length[Select[Table[k, {k, 10^(n-1),10^n-1}],IntegerQ[Sqrt[#+FromDigits[Reverse[IntegerDigits[#]]]]]&]]; Array[a,10] (* Stefano Spezia, Dec 09 2022 *)
  • Python
    from math import isqrt
    def s(n): return isqrt(n)**2 == n
    def c(n): return s(n + int(str(n)[::-1]))
    def a(n): return 3 if n == 1 else sum(1 for k in range(10**(n-1), 10**n) if c(k))
    print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Dec 08 2022

Extensions

a(9)-a(10) from Michael S. Branicky, Dec 08 2022
a(11)-a(20) from Talmon Silver, Dec 25 2022
Showing 1-2 of 2 results.