login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048411 Squares whose consecutive digits differ by 1. 3
0, 1, 4, 9, 121, 676, 12321, 1234321, 123454321, 12345654321, 1234567654321, 123456787654321, 12345678987654321 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(14), if it exists, is > 10^34. - Lars Blomberg, Nov 25 2016
Is it true that all terms are palindromes? - Chai Wah Wu, Apr 06 2018
LINKS
FORMULA
a(n) = A048412(n)^2.
MATHEMATICA
Select[Range[0, 10^7]^2, Or[# == 0, IntegerLength@ # == 1, Union@ Abs@ Differences@ IntegerDigits@ # == {1}] &] (* Michael De Vlieger, Nov 25 2016 *)
PROG
(Haskell)
a048411 n = a048411_list !! (n-1)
a048411_list = filter ((== 1) . a010052) a033075_list
-- Reinhard Zumkeller, Feb 21 2012
(Python)
from sympy.ntheory.primetest import is_square
def gen(d, s=None):
if d == 0: yield tuple(); return
if s == None:
yield from [(i, ) + g for i in range(1, 10) for g in gen(d-1, s=i)]
else:
if s > 0: yield from [(s-1, ) + g for g in gen(d-1, s=s-1)]
if s < 9: yield from [(s+1, ) + g for g in gen(d-1, s=s+1)]
def afind(maxdigits):
print(0, end=", ")
for d in range(1, maxdigits+1):
for g in gen(d, s=None):
t = int("".join(map(str, g)))
if is_square(t): print(t, end=", ")
afind(17) # Michael S. Branicky, Sep 26 2021
CROSSREFS
Cf. A010052; intersection of A033075 and A000290.
Sequence in context: A028817 A319483 A057136 * A225739 A065379 A063783
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Apr 15 1999
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)